| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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 UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ | 5 #ifndef UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ |
| 6 #define UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ | 6 #define UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/base/ui_export.h" |
| 9 #include "ui/gfx/native_widget_types.h" |
| 9 | 10 |
| 10 namespace gfx { | 11 namespace gfx { |
| 11 class VSyncProvider; | 12 class VSyncProvider; |
| 12 } // namespace gfx | 13 } // namespace gfx |
| 13 | 14 |
| 14 namespace ui { | 15 namespace ui { |
| 15 | 16 |
| 16 class SurfaceFactoryOzone { | 17 class SurfaceFactoryOzone { |
| 17 public: | 18 public: |
| 18 SurfaceFactoryOzone(); | 19 SurfaceFactoryOzone(); |
| 19 virtual ~SurfaceFactoryOzone(); | 20 virtual ~SurfaceFactoryOzone(); |
| 20 | 21 |
| 21 // Returns the instance | 22 // Returns the instance |
| 22 static SurfaceFactoryOzone* GetInstance(); | 23 UI_EXPORT static SurfaceFactoryOzone* GetInstance(); |
| 23 | 24 |
| 24 // Returns a display spec as in |CreateDisplayFromSpec| for the default | 25 // Returns a display spec as in |CreateDisplayFromSpec| for the default |
| 25 // native surface. | 26 // native surface. |
| 26 virtual const char* DefaultDisplaySpec(); | 27 virtual const char* DefaultDisplaySpec(); |
| 27 | 28 |
| 28 // Sets the implementation delegate. | 29 // Sets the implementation delegate. |
| 29 static void SetInstance(SurfaceFactoryOzone* impl); | 30 UI_EXPORT static void SetInstance(SurfaceFactoryOzone* impl); |
| 30 | 31 |
| 31 // TODO(rjkroege): Add a status code if necessary. | 32 // TODO(rjkroege): Add a status code if necessary. |
| 32 // Configures the display hardware. Must be called from within the GPU | 33 // Configures the display hardware. Must be called from within the GPU |
| 33 // process before the sandbox has been activated. | 34 // process before the sandbox has been activated. |
| 34 virtual void InitializeHardware() = 0; | 35 virtual void InitializeHardware() = 0; |
| 35 | 36 |
| 36 // Cleans up display hardware state. Call this from within the GPU process. | 37 // Cleans up display hardware state. Call this from within the GPU process. |
| 37 // This method must be safe to run inside of the sandbox. | 38 // This method must be safe to run inside of the sandbox. |
| 38 virtual void ShutdownHardware() = 0; | 39 virtual void ShutdownHardware() = 0; |
| 39 | 40 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 61 // operations (e.g. opening a file descriptor providing vsync events) that | 62 // operations (e.g. opening a file descriptor providing vsync events) that |
| 62 // must be done outside of the sandbox, they must have been completed | 63 // must be done outside of the sandbox, they must have been completed |
| 63 // in InitializeHardware. Returns NULL on error. | 64 // in InitializeHardware. Returns NULL on error. |
| 64 virtual gfx::VSyncProvider* GetVSyncProvider(gfx::AcceleratedWidget w) = 0; | 65 virtual gfx::VSyncProvider* GetVSyncProvider(gfx::AcceleratedWidget w) = 0; |
| 65 }; | 66 }; |
| 66 | 67 |
| 67 } // namespace ui | 68 } // namespace ui |
| 68 | 69 |
| 69 | 70 |
| 70 #endif // UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ | 71 #endif // UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ |
| OLD | NEW |