Home | History | Annotate | Download | only in aura
      1 // Copyright (c) 2013 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_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
      6 #define CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
      7 
      8 #include "base/memory/scoped_ptr.h"
      9 #include "content/browser/aura/image_transport_factory.h"
     10 
     11 namespace content {
     12 
     13 // An ImageTransportFactory that disables transport.
     14 class NoTransportImageTransportFactory : public ImageTransportFactory {
     15  public:
     16   explicit NoTransportImageTransportFactory(
     17       ui::ContextFactory* context_factory);
     18   virtual ~NoTransportImageTransportFactory();
     19 
     20   // ImageTransportFactory implementation.
     21   virtual ui::ContextFactory* AsContextFactory() OVERRIDE;
     22   virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() OVERRIDE;
     23   virtual void DestroySharedSurfaceHandle(gfx::GLSurfaceHandle surface)
     24       OVERRIDE;
     25   virtual scoped_refptr<ui::Texture> CreateTransportClient(
     26       float device_scale_factor) OVERRIDE;
     27   virtual scoped_refptr<ui::Texture> CreateOwnedTexture(
     28       const gfx::Size& size,
     29       float device_scale_factor,
     30       unsigned int texture_id) OVERRIDE;
     31   virtual GLHelper* GetGLHelper() OVERRIDE;
     32   virtual uint32 InsertSyncPoint() OVERRIDE;
     33   virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE;
     34   virtual void AddObserver(ImageTransportFactoryObserver* observer) OVERRIDE;
     35   virtual void RemoveObserver(ImageTransportFactoryObserver* observer) OVERRIDE;
     36 
     37  private:
     38   scoped_ptr<ui::ContextFactory> context_factory_;
     39 
     40   DISALLOW_COPY_AND_ASSIGN(NoTransportImageTransportFactory);
     41 };
     42 
     43 }  // namespace content
     44 
     45 #endif  // CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
     46