Home | History | Annotate | Download | only in test
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CONTENT_BROWSER_RENDERER_HOST_TEST_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_ANDROID_H_
      6 #define CONTENT_BROWSER_RENDERER_HOST_TEST_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_ANDROID_H_
      7 
      8 #include "base/memory/ref_counted.h"
      9 #include "base/memory/scoped_ptr.h"
     10 #include "content/browser/renderer_host/image_transport_factory_android.h"
     11 
     12 namespace cc {
     13 class ContextProvider;
     14 }
     15 
     16 namespace ui {
     17 class ContextFactory;
     18 }
     19 
     20 namespace content {
     21 class GLHelper;
     22 
     23 // An ImageTransportFactoryAndroid that disables transport. This class is for
     24 // unittests.
     25 class NoTransportImageTransportFactoryAndroid
     26     : public ImageTransportFactoryAndroid {
     27  public:
     28   NoTransportImageTransportFactoryAndroid();
     29   virtual ~NoTransportImageTransportFactoryAndroid();
     30   virtual GLHelper* GetGLHelper() OVERRIDE;
     31   virtual uint32 GetChannelID() OVERRIDE;
     32 
     33  private:
     34   scoped_ptr<ui::ContextFactory> context_factory_;
     35   scoped_refptr<cc::ContextProvider> context_provider_;
     36   scoped_ptr<GLHelper> gl_helper_;
     37 
     38   DISALLOW_COPY_AND_ASSIGN(NoTransportImageTransportFactoryAndroid);
     39 };
     40 
     41 }  // namespace content
     42 
     43 #endif  // CONTENT_BROWSER_RENDERER_HOST_TEST_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_ANDROID_H_
     44