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

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

Issue 755883002: Input Injection API on Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit test Created 6 years 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
« no previous file with comments | « ui/ozone/platform/test/ozone_platform_test.cc ('k') | ui/ozone/public/system_input_injector.h » ('j') | 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 { 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;
19 class SurfaceFactoryOzone;
20 class GpuPlatformSupport; 18 class GpuPlatformSupport;
21 class GpuPlatformSupportHost; 19 class GpuPlatformSupportHost;
20 class NativeDisplayDelegate;
22 class PlatformWindow; 21 class PlatformWindow;
23 class PlatformWindowDelegate; 22 class PlatformWindowDelegate;
23 class SurfaceFactoryOzone;
24 class SystemInputInjector;
24 25
25 // Base class for Ozone platform implementations. 26 // Base class for Ozone platform implementations.
26 // 27 //
27 // Ozone platforms must override this class and implement the virtual 28 // Ozone platforms must override this class and implement the virtual
28 // GetFooFactoryOzone() methods to provide implementations of the 29 // GetFooFactoryOzone() methods to provide implementations of the
29 // various ozone interfaces. 30 // various ozone interfaces.
30 // 31 //
31 // The OzonePlatform subclass can own any state needed by the 32 // The OzonePlatform subclass can own any state needed by the
32 // implementation that is shared between the various ozone interfaces, 33 // implementation that is shared between the various ozone interfaces,
33 // such as a connection to the windowing system. 34 // such as a connection to the windowing system.
(...skipping 16 matching lines...) Expand all
50 51
51 static OzonePlatform* GetInstance(); 52 static OzonePlatform* GetInstance();
52 53
53 // Factory getters to override in subclasses. The returned objects will be 54 // Factory getters to override in subclasses. The returned objects will be
54 // injected into the appropriate layer at startup. Subclasses should not 55 // injected into the appropriate layer at startup. Subclasses should not
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;
61 virtual scoped_ptr<SystemInputInjector> CreateSystemInputInjector() = 0;
60 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( 62 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
61 PlatformWindowDelegate* delegate, 63 PlatformWindowDelegate* delegate,
62 const gfx::Rect& bounds) = 0; 64 const gfx::Rect& bounds) = 0;
63 virtual scoped_ptr<ui::NativeDisplayDelegate> 65 virtual scoped_ptr<ui::NativeDisplayDelegate>
64 CreateNativeDisplayDelegate() = 0; 66 CreateNativeDisplayDelegate() = 0;
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_
OLDNEW
« no previous file with comments | « ui/ozone/platform/test/ozone_platform_test.cc ('k') | ui/ozone/public/system_input_injector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698