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 UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 5 #ifndef UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
6 #define UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 6 #define UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class InterfaceRegistry; | 23 class InterfaceRegistry; |
24 } | 24 } |
25 | 25 |
26 namespace ui { | 26 namespace ui { |
27 | 27 |
28 class CursorFactoryOzone; | 28 class CursorFactoryOzone; |
29 class InputController; | 29 class InputController; |
30 class GpuPlatformSupportHost; | 30 class GpuPlatformSupportHost; |
31 class NativeDisplayDelegate; | 31 class NativeDisplayDelegate; |
32 class OverlayManagerOzone; | 32 class OverlayManagerOzone; |
| 33 class OzonePlatformScreenDelegate; |
33 class PlatformWindow; | 34 class PlatformWindow; |
34 class PlatformWindowDelegate; | 35 class PlatformWindowDelegate; |
35 class SurfaceFactoryOzone; | 36 class SurfaceFactoryOzone; |
36 class SystemInputInjector; | 37 class SystemInputInjector; |
37 | 38 |
38 // Base class for Ozone platform implementations. | 39 // Base class for Ozone platform implementations. |
39 // | 40 // |
40 // Ozone platforms must override this class and implement the virtual | 41 // Ozone platforms must override this class and implement the virtual |
41 // GetFooFactoryOzone() methods to provide implementations of the | 42 // GetFooFactoryOzone() methods to provide implementations of the |
42 // various ozone interfaces. | 43 // various ozone interfaces. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 108 |
108 // Ozone platform implementations may also choose to expose mojo interfaces to | 109 // Ozone platform implementations may also choose to expose mojo interfaces to |
109 // internal functionality. Embedders wishing to take advantage of ozone mojo | 110 // internal functionality. Embedders wishing to take advantage of ozone mojo |
110 // implementations must invoke AddInterfaces with a valid | 111 // implementations must invoke AddInterfaces with a valid |
111 // shell::InterfaceRegistry* pointer to export all Mojo interfaces defined | 112 // shell::InterfaceRegistry* pointer to export all Mojo interfaces defined |
112 // within Ozone. | 113 // within Ozone. |
113 // | 114 // |
114 // A default do-nothing implementation is provided to permit platform | 115 // A default do-nothing implementation is provided to permit platform |
115 // implementations to opt out of implementing any Mojo interfaces. | 116 // implementations to opt out of implementing any Mojo interfaces. |
116 virtual void AddInterfaces(shell::InterfaceRegistry* registry); | 117 virtual void AddInterfaces(shell::InterfaceRegistry* registry); |
| 118 virtual void SetScreenOutputObserver(OzonePlatformScreenDelegate*) {} |
117 | 119 |
118 private: | 120 private: |
119 virtual void InitializeUI() = 0; | 121 virtual void InitializeUI() = 0; |
120 virtual void InitializeGPU() = 0; | 122 virtual void InitializeGPU() = 0; |
121 virtual void InitializeUI(const InitParams& args); | 123 virtual void InitializeUI(const InitParams& args); |
122 virtual void InitializeGPU(const InitParams& args); | 124 virtual void InitializeGPU(const InitParams& args); |
123 | 125 |
124 static void CreateInstance(); | 126 static void CreateInstance(); |
125 | 127 |
126 static OzonePlatform* instance_; | 128 static OzonePlatform* instance_; |
127 | 129 |
128 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); | 130 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); |
129 }; | 131 }; |
130 | 132 |
131 } // namespace ui | 133 } // namespace ui |
132 | 134 |
133 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 135 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
OLD | NEW |