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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/ozone/ozone_export.h" | 9 #include "ui/ozone/ozone_export.h" |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 OzonePlatform(); | 44 OzonePlatform(); |
45 virtual ~OzonePlatform(); | 45 virtual ~OzonePlatform(); |
46 | 46 |
47 // Initializes the subsystems/resources necessary for the UI process (e.g. | 47 // Initializes the subsystems/resources necessary for the UI process (e.g. |
48 // events, surface, etc.) | 48 // events, surface, etc.) |
49 static void InitializeForUI(); | 49 static void InitializeForUI(); |
50 | 50 |
51 // Initializes the subsystems/resources necessary for the GPU process. | 51 // Initializes the subsystems/resources necessary for the GPU process. |
52 static void InitializeForGPU(); | 52 static void InitializeForGPU(); |
53 | 53 |
54 // Initializes both Browser and GPU side code. | |
55 static void InitializeForTest(); | |
spang
2015/07/13 17:08:26
I don't think we should have an "InitializeForTest
| |
56 | |
54 static OzonePlatform* GetInstance(); | 57 static OzonePlatform* GetInstance(); |
55 | 58 |
56 // Factory getters to override in subclasses. The returned objects will be | 59 // Factory getters to override in subclasses. The returned objects will be |
57 // injected into the appropriate layer at startup. Subclasses should not | 60 // injected into the appropriate layer at startup. Subclasses should not |
58 // inject these objects themselves. Ownership is retained by OzonePlatform. | 61 // inject these objects themselves. Ownership is retained by OzonePlatform. |
59 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; | 62 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; |
60 virtual ui::OverlayManagerOzone* GetOverlayManager() = 0; | 63 virtual ui::OverlayManagerOzone* GetOverlayManager() = 0; |
61 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; | 64 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; |
62 virtual ui::InputController* GetInputController() = 0; | 65 virtual ui::InputController* GetInputController() = 0; |
63 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0; | 66 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0; |
64 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; | 67 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; |
65 virtual scoped_ptr<SystemInputInjector> CreateSystemInputInjector() = 0; | 68 virtual scoped_ptr<SystemInputInjector> CreateSystemInputInjector() = 0; |
66 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( | 69 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( |
67 PlatformWindowDelegate* delegate, | 70 PlatformWindowDelegate* delegate, |
68 const gfx::Rect& bounds) = 0; | 71 const gfx::Rect& bounds) = 0; |
69 virtual scoped_ptr<ui::NativeDisplayDelegate> | 72 virtual scoped_ptr<ui::NativeDisplayDelegate> |
70 CreateNativeDisplayDelegate() = 0; | 73 CreateNativeDisplayDelegate() = 0; |
71 | 74 |
72 private: | 75 private: |
73 virtual void InitializeUI() = 0; | 76 virtual void InitializeUI() = 0; |
74 virtual void InitializeGPU() = 0; | 77 virtual void InitializeGPU() = 0; |
78 virtual void InitializeTest() = 0; | |
75 | 79 |
76 static void CreateInstance(); | 80 static void CreateInstance(); |
77 | 81 |
78 static OzonePlatform* instance_; | 82 static OzonePlatform* instance_; |
79 | 83 |
80 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); | 84 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); |
81 }; | 85 }; |
82 | 86 |
83 } // namespace ui | 87 } // namespace ui |
84 | 88 |
85 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 89 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
OLD | NEW |