| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // Terminates the global transport factory. | 65 // Terminates the global transport factory. |
| 66 static void Terminate(); | 66 static void Terminate(); |
| 67 | 67 |
| 68 // Gets the factory instance. | 68 // Gets the factory instance. |
| 69 static ImageTransportFactory* GetInstance(); | 69 static ImageTransportFactory* GetInstance(); |
| 70 | 70 |
| 71 // Gets the image transport factory as a context factory for the compositor. | 71 // Gets the image transport factory as a context factory for the compositor. |
| 72 virtual ui::ContextFactory* GetContextFactory() = 0; | 72 virtual ui::ContextFactory* GetContextFactory() = 0; |
| 73 | 73 |
| 74 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() = 0; | 74 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() = 0; |
| 75 virtual scoped_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator() = 0; | |
| 76 virtual cc::SurfaceManager* GetSurfaceManager() = 0; | 75 virtual cc::SurfaceManager* GetSurfaceManager() = 0; |
| 77 | 76 |
| 78 // Gets a GLHelper instance, associated with the shared context. This | 77 // Gets a GLHelper instance, associated with the shared context. This |
| 79 // GLHelper will get destroyed whenever the shared context is lost | 78 // GLHelper will get destroyed whenever the shared context is lost |
| 80 // (ImageTransportFactoryObserver::OnLostResources is called). | 79 // (ImageTransportFactoryObserver::OnLostResources is called). |
| 81 virtual GLHelper* GetGLHelper() = 0; | 80 virtual GLHelper* GetGLHelper() = 0; |
| 82 | 81 |
| 83 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; | 82 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; |
| 84 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; | 83 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; |
| 85 | 84 |
| 86 #if defined(OS_MACOSX) | 85 #if defined(OS_MACOSX) |
| 87 virtual void OnSurfaceDisplayed(int surface_id) = 0; | 86 virtual void OnSurfaceDisplayed(int surface_id) = 0; |
| 88 #endif | 87 #endif |
| 89 }; | 88 }; |
| 90 | 89 |
| 91 } // namespace content | 90 } // namespace content |
| 92 | 91 |
| 93 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ | 92 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ |
| OLD | NEW |