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 |
11 namespace gfx { | 11 namespace gfx { |
12 class Rect; | 12 class Rect; |
13 } | 13 } |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 class CursorFactoryOzone; | 17 class CursorFactoryOzone; |
18 class NativeDisplayDelegate; | 18 class NativeDisplayDelegate; |
19 class SurfaceFactoryOzone; | 19 class SurfaceFactoryOzone; |
20 class TouchscreenDeviceManager; | |
21 class GpuPlatformSupport; | 20 class GpuPlatformSupport; |
22 class GpuPlatformSupportHost; | 21 class GpuPlatformSupportHost; |
23 class PlatformWindow; | 22 class PlatformWindow; |
24 class PlatformWindowDelegate; | 23 class PlatformWindowDelegate; |
25 | 24 |
26 // Base class for Ozone platform implementations. | 25 // Base class for Ozone platform implementations. |
27 // | 26 // |
28 // Ozone platforms must override this class and implement the virtual | 27 // Ozone platforms must override this class and implement the virtual |
29 // GetFooFactoryOzone() methods to provide implementations of the | 28 // GetFooFactoryOzone() methods to provide implementations of the |
30 // various ozone interfaces. | 29 // various ozone interfaces. |
(...skipping 26 matching lines...) Expand all Loading... |
57 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; | 56 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; |
58 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; | 57 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; |
59 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0; | 58 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0; |
60 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; | 59 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; |
61 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( | 60 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( |
62 PlatformWindowDelegate* delegate, | 61 PlatformWindowDelegate* delegate, |
63 const gfx::Rect& bounds) = 0; | 62 const gfx::Rect& bounds) = 0; |
64 #if defined(OS_CHROMEOS) | 63 #if defined(OS_CHROMEOS) |
65 virtual scoped_ptr<ui::NativeDisplayDelegate> | 64 virtual scoped_ptr<ui::NativeDisplayDelegate> |
66 CreateNativeDisplayDelegate() = 0; | 65 CreateNativeDisplayDelegate() = 0; |
67 virtual scoped_ptr<ui::TouchscreenDeviceManager> | |
68 CreateTouchscreenDeviceManager() = 0; | |
69 #endif | 66 #endif |
70 | 67 |
71 private: | 68 private: |
72 virtual void InitializeUI() = 0; | 69 virtual void InitializeUI() = 0; |
73 virtual void InitializeGPU() = 0; | 70 virtual void InitializeGPU() = 0; |
74 | 71 |
75 static void CreateInstance(); | 72 static void CreateInstance(); |
76 | 73 |
77 static OzonePlatform* instance_; | 74 static OzonePlatform* instance_; |
78 | 75 |
79 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); | 76 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); |
80 }; | 77 }; |
81 | 78 |
82 } // namespace ui | 79 } // namespace ui |
83 | 80 |
84 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 81 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
OLD | NEW |