Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: ui/ozone/public/ozone_platform.h

Issue 375053002: ozone: Port WindowTreeHostOzone on top of PlatformWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/ozone/platform/test/ozone_platform_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 {
12 class Rect;
13 }
14
11 namespace ui { 15 namespace ui {
12 16
13 class CursorFactoryOzone; 17 class CursorFactoryOzone;
14 class EventFactoryOzone; 18 class EventFactoryOzone;
15 class NativeDisplayDelegate; 19 class NativeDisplayDelegate;
16 class SurfaceFactoryOzone; 20 class SurfaceFactoryOzone;
17 class TouchscreenDeviceManager; 21 class TouchscreenDeviceManager;
18 class GpuPlatformSupport; 22 class GpuPlatformSupport;
19 class GpuPlatformSupportHost; 23 class GpuPlatformSupportHost;
24 class PlatformWindow;
25 class PlatformWindowDelegate;
20 26
21 // Base class for Ozone platform implementations. 27 // Base class for Ozone platform implementations.
22 // 28 //
23 // Ozone platforms must override this class and implement the virtual 29 // Ozone platforms must override this class and implement the virtual
24 // GetFooFactoryOzone() methods to provide implementations of the 30 // GetFooFactoryOzone() methods to provide implementations of the
25 // various ozone interfaces. 31 // various ozone interfaces.
26 // 32 //
27 // The OzonePlatform subclass can own any state needed by the 33 // The OzonePlatform subclass can own any state needed by the
28 // implementation that is shared between the various ozone interfaces, 34 // implementation that is shared between the various ozone interfaces,
29 // such as a connection to the windowing system. 35 // such as a connection to the windowing system.
(...skipping 17 matching lines...) Expand all
47 static OzonePlatform* GetInstance(); 53 static OzonePlatform* GetInstance();
48 54
49 // Factory getters to override in subclasses. The returned objects will be 55 // Factory getters to override in subclasses. The returned objects will be
50 // injected into the appropriate layer at startup. Subclasses should not 56 // injected into the appropriate layer at startup. Subclasses should not
51 // inject these objects themselves. Ownership is retained by OzonePlatform. 57 // inject these objects themselves. Ownership is retained by OzonePlatform.
52 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; 58 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0;
53 virtual ui::EventFactoryOzone* GetEventFactoryOzone() = 0; 59 virtual ui::EventFactoryOzone* GetEventFactoryOzone() = 0;
54 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; 60 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0;
55 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0; 61 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0;
56 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; 62 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0;
63 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
64 PlatformWindowDelegate* delegate,
65 const gfx::Rect& bounds) = 0;
57 #if defined(OS_CHROMEOS) 66 #if defined(OS_CHROMEOS)
58 virtual scoped_ptr<ui::NativeDisplayDelegate> 67 virtual scoped_ptr<ui::NativeDisplayDelegate>
59 CreateNativeDisplayDelegate() = 0; 68 CreateNativeDisplayDelegate() = 0;
60 virtual scoped_ptr<ui::TouchscreenDeviceManager> 69 virtual scoped_ptr<ui::TouchscreenDeviceManager>
61 CreateTouchscreenDeviceManager() = 0; 70 CreateTouchscreenDeviceManager() = 0;
62 #endif 71 #endif
63 72
64 private: 73 private:
65 virtual void InitializeUI() = 0; 74 virtual void InitializeUI() = 0;
66 virtual void InitializeGPU() = 0; 75 virtual void InitializeGPU() = 0;
67 76
68 static void CreateInstance(); 77 static void CreateInstance();
69 78
70 static OzonePlatform* instance_; 79 static OzonePlatform* instance_;
71 80
72 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); 81 DISALLOW_COPY_AND_ASSIGN(OzonePlatform);
73 }; 82 };
74 83
75 } // namespace ui 84 } // namespace ui
76 85
77 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ 86 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/test/ozone_platform_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698