OLD | NEW |
| (Empty) |
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 cc { | |
12 class ContextProvider; | |
13 } | |
14 | |
15 namespace content { | |
16 | |
17 // An ImageTransportFactory that disables transport. | |
18 class NoTransportImageTransportFactory : public ImageTransportFactory { | |
19 public: | |
20 explicit NoTransportImageTransportFactory( | |
21 scoped_ptr<ui::ContextFactory> context_factory); | |
22 virtual ~NoTransportImageTransportFactory(); | |
23 | |
24 // ImageTransportFactory implementation. | |
25 virtual ui::ContextFactory* AsContextFactory() OVERRIDE; | |
26 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() OVERRIDE; | |
27 virtual scoped_refptr<ui::Texture> CreateTransportClient( | |
28 float device_scale_factor) OVERRIDE; | |
29 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( | |
30 const gfx::Size& size, | |
31 float device_scale_factor, | |
32 unsigned int texture_id) OVERRIDE; | |
33 virtual GLHelper* GetGLHelper() 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 scoped_refptr<cc::ContextProvider> context_provider_; | |
40 scoped_ptr<GLHelper> gl_helper_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(NoTransportImageTransportFactory); | |
43 }; | |
44 | |
45 } // namespace content | |
46 | |
47 #endif // CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_ | |
OLD | NEW |