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> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "ui/ozone/ozone_export.h" | 11 #include "ui/ozone/ozone_export.h" |
11 | 12 |
12 namespace gfx { | 13 namespace gfx { |
13 class Rect; | 14 class Rect; |
14 } | 15 } |
15 | 16 |
16 namespace ui { | 17 namespace ui { |
17 | 18 |
18 class CursorFactoryOzone; | 19 class CursorFactoryOzone; |
19 class InputController; | 20 class InputController; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 57 |
57 // Factory getters to override in subclasses. The returned objects will be | 58 // Factory getters to override in subclasses. The returned objects will be |
58 // injected into the appropriate layer at startup. Subclasses should not | 59 // injected into the appropriate layer at startup. Subclasses should not |
59 // inject these objects themselves. Ownership is retained by OzonePlatform. | 60 // inject these objects themselves. Ownership is retained by OzonePlatform. |
60 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; | 61 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; |
61 virtual ui::OverlayManagerOzone* GetOverlayManager() = 0; | 62 virtual ui::OverlayManagerOzone* GetOverlayManager() = 0; |
62 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; | 63 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; |
63 virtual ui::InputController* GetInputController() = 0; | 64 virtual ui::InputController* GetInputController() = 0; |
64 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0; | 65 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0; |
65 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; | 66 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; |
66 virtual scoped_ptr<SystemInputInjector> CreateSystemInputInjector() = 0; | 67 virtual std::unique_ptr<SystemInputInjector> CreateSystemInputInjector() = 0; |
67 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( | 68 virtual std::unique_ptr<PlatformWindow> CreatePlatformWindow( |
68 PlatformWindowDelegate* delegate, | 69 PlatformWindowDelegate* delegate, |
69 const gfx::Rect& bounds) = 0; | 70 const gfx::Rect& bounds) = 0; |
70 virtual scoped_ptr<ui::NativeDisplayDelegate> | 71 virtual std::unique_ptr<ui::NativeDisplayDelegate> |
71 CreateNativeDisplayDelegate() = 0; | 72 CreateNativeDisplayDelegate() = 0; |
72 | 73 |
73 private: | 74 private: |
74 virtual void InitializeUI() = 0; | 75 virtual void InitializeUI() = 0; |
75 virtual void InitializeGPU() = 0; | 76 virtual void InitializeGPU() = 0; |
76 | 77 |
77 static void CreateInstance(); | 78 static void CreateInstance(); |
78 | 79 |
79 static OzonePlatform* instance_; | 80 static OzonePlatform* instance_; |
80 | 81 |
81 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); | 82 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); |
82 }; | 83 }; |
83 | 84 |
84 } // namespace ui | 85 } // namespace ui |
85 | 86 |
86 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 87 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
OLD | NEW |