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/callback.h" |
8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
9 #include "ui/ozone/ozone_export.h" | 10 #include "ui/ozone/ozone_export.h" |
10 | 11 |
11 namespace gfx { | 12 namespace gfx { |
12 class Rect; | 13 class Rect; |
13 } | 14 } |
14 | 15 |
15 namespace ui { | 16 namespace ui { |
16 | 17 |
17 class CursorFactoryOzone; | 18 class CursorFactoryOzone; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // inject these objects themselves. Ownership is retained by OzonePlatform. | 56 // inject these objects themselves. Ownership is retained by OzonePlatform. |
56 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; | 57 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; |
57 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; | 58 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; |
58 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0; | 59 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0; |
59 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; | 60 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; |
60 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( | 61 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( |
61 PlatformWindowDelegate* delegate, | 62 PlatformWindowDelegate* delegate, |
62 const gfx::Rect& bounds) = 0; | 63 const gfx::Rect& bounds) = 0; |
63 virtual scoped_ptr<ui::NativeDisplayDelegate> | 64 virtual scoped_ptr<ui::NativeDisplayDelegate> |
64 CreateNativeDisplayDelegate() = 0; | 65 CreateNativeDisplayDelegate() = 0; |
| 66 virtual void RelinquishGpuResources(base::Closure callback); |
65 | 67 |
66 private: | 68 private: |
67 virtual void InitializeUI() = 0; | 69 virtual void InitializeUI() = 0; |
68 virtual void InitializeGPU() = 0; | 70 virtual void InitializeGPU() = 0; |
69 | 71 |
70 static void CreateInstance(); | 72 static void CreateInstance(); |
71 | 73 |
72 static OzonePlatform* instance_; | 74 static OzonePlatform* instance_; |
73 | 75 |
74 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); | 76 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); |
75 }; | 77 }; |
76 | 78 |
77 } // namespace ui | 79 } // namespace ui |
78 | 80 |
79 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 81 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
OLD | NEW |