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 // Returns the message loop type required for OzonePlatform instance that | |
| 97 // will be initialized. | |
| 98 static base::MessageLoop::Type GetMessageLoopType(); | |
|
sadrul
2017/01/31 17:40:09
Also, change this to GetMessageLoopTypeForGpu()?
tonikitoo
2017/02/07 16:18:37
Done.
| |
| 99 | |
| 95 // Factory getters to override in subclasses. The returned objects will be | 100 // Factory getters to override in subclasses. The returned objects will be |
| 96 // injected into the appropriate layer at startup. Subclasses should not | 101 // injected into the appropriate layer at startup. Subclasses should not |
| 97 // inject these objects themselves. Ownership is retained by OzonePlatform. | 102 // inject these objects themselves. Ownership is retained by OzonePlatform. |
| 98 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; | 103 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; |
| 99 virtual ui::OverlayManagerOzone* GetOverlayManager() = 0; | 104 virtual ui::OverlayManagerOzone* GetOverlayManager() = 0; |
| 100 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; | 105 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; |
| 101 virtual ui::InputController* GetInputController() = 0; | 106 virtual ui::InputController* GetInputController() = 0; |
| 102 virtual IPC::MessageFilter* GetGpuMessageFilter(); | 107 virtual IPC::MessageFilter* GetGpuMessageFilter(); |
| 103 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; | 108 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; |
| 104 virtual std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() = 0; | 109 virtual std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() = 0; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 127 static void CreateInstance(); | 132 static void CreateInstance(); |
| 128 | 133 |
| 129 static OzonePlatform* instance_; | 134 static OzonePlatform* instance_; |
| 130 | 135 |
| 131 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); | 136 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); |
| 132 }; | 137 }; |
| 133 | 138 |
| 134 } // namespace ui | 139 } // namespace ui |
| 135 | 140 |
| 136 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 141 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
| OLD | NEW |