Chromium Code Reviews| 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" |
| 11 #include "base/message_loop/message_loop.h" | |
| 11 #include "ui/ozone/ozone_export.h" | 12 #include "ui/ozone/ozone_export.h" |
| 12 | 13 |
| 13 namespace display { | 14 namespace display { |
| 14 class NativeDisplayDelegate; | 15 class NativeDisplayDelegate; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace gfx { | 18 namespace gfx { |
| 18 class Rect; | 19 class Rect; |
| 19 } | 20 } |
| 20 | 21 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 // Initializes the subsystems/resources necessary for rendering (i.e. GPU). | 86 // Initializes the subsystems/resources necessary for rendering (i.e. GPU). |
| 86 // TODO(rjkroege): Remove deprecated entry point (http://crbug.com/620934) | 87 // TODO(rjkroege): Remove deprecated entry point (http://crbug.com/620934) |
| 87 static void InitializeForGPU(); | 88 static void InitializeForGPU(); |
| 88 | 89 |
| 89 // Initializes the subsystems for rendering but with additional properties | 90 // Initializes the subsystems for rendering but with additional properties |
| 90 // provided by |args| as with InitalizeForUI. | 91 // provided by |args| as with InitalizeForUI. |
| 91 static void InitializeForGPU(const InitParams& args); | 92 static void InitializeForGPU(const InitParams& args); |
| 92 | 93 |
| 93 static OzonePlatform* GetInstance(); | 94 static OzonePlatform* GetInstance(); |
| 94 | 95 |
| 96 static base::MessageLoop::Type GetMessageLoopType(); | |
|
kylechar
2017/01/17 21:54:53
Add a comment to why this is here.
| |
| 97 | |
| 95 // Factory getters to override in subclasses. The returned objects will be | 98 // Factory getters to override in subclasses. The returned objects will be |
| 96 // injected into the appropriate layer at startup. Subclasses should not | 99 // injected into the appropriate layer at startup. Subclasses should not |
| 97 // inject these objects themselves. Ownership is retained by OzonePlatform. | 100 // inject these objects themselves. Ownership is retained by OzonePlatform. |
| 98 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; | 101 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; |
| 99 virtual ui::OverlayManagerOzone* GetOverlayManager() = 0; | 102 virtual ui::OverlayManagerOzone* GetOverlayManager() = 0; |
| 100 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; | 103 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; |
| 101 virtual ui::InputController* GetInputController() = 0; | 104 virtual ui::InputController* GetInputController() = 0; |
| 102 virtual IPC::MessageFilter* GetGpuMessageFilter(); | 105 virtual IPC::MessageFilter* GetGpuMessageFilter(); |
| 103 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; | 106 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; |
| 104 virtual std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() = 0; | 107 virtual std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() = 0; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 127 static void CreateInstance(); | 130 static void CreateInstance(); |
| 128 | 131 |
| 129 static OzonePlatform* instance_; | 132 static OzonePlatform* instance_; |
| 130 | 133 |
| 131 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); | 134 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); |
| 132 }; | 135 }; |
| 133 | 136 |
| 134 } // namespace ui | 137 } // namespace ui |
| 135 | 138 |
| 136 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 139 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
| OLD | NEW |