OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 // context factory. | 57 // context factory. |
58 static void InitializeForUnitTests( | 58 static void InitializeForUnitTests( |
59 scoped_ptr<ui::ContextFactory> test_factory); | 59 scoped_ptr<ui::ContextFactory> test_factory); |
60 | 60 |
61 // Terminates the global transport factory. | 61 // Terminates the global transport factory. |
62 static void Terminate(); | 62 static void Terminate(); |
63 | 63 |
64 // Gets the factory instance. | 64 // Gets the factory instance. |
65 static ImageTransportFactory* GetInstance(); | 65 static ImageTransportFactory* GetInstance(); |
66 | 66 |
67 // Gets the image transport factory as a context factory for the compositor. | |
68 virtual ui::ContextFactory* AsContextFactory() = 0; | |
piman
2014/05/08 01:34:56
Slightly unrelated, but the only place this is cal
| |
69 | |
70 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() = 0; | 67 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() = 0; |
71 | 68 |
72 // Gets a GLHelper instance, associated with the shared context. This | 69 // Gets a GLHelper instance, associated with the shared context. This |
73 // GLHelper will get destroyed whenever the shared context is lost | 70 // GLHelper will get destroyed whenever the shared context is lost |
74 // (ImageTransportFactoryObserver::OnLostResources is called). | 71 // (ImageTransportFactoryObserver::OnLostResources is called). |
75 virtual GLHelper* GetGLHelper() = 0; | 72 virtual GLHelper* GetGLHelper() = 0; |
76 | 73 |
77 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; | 74 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; |
78 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; | 75 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; |
79 }; | 76 }; |
80 | 77 |
81 } // namespace content | 78 } // namespace content |
82 | 79 |
83 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ | 80 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ |
OLD | NEW |