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

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

Issue 312393002: ozone: Move the factory interfaces into a common target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r278697 Created 6 years, 6 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/ozone_base_export.h ('k') | ui/ozone/platform/caca/caca_event_factory.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_OZONE_PLATFORM_H_ 5 #ifndef UI_OZONE_OZONE_PLATFORM_H_
6 #define UI_OZONE_OZONE_PLATFORM_H_ 6 #define UI_OZONE_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 SurfaceFactoryOzone;
13 }
14
15 namespace ui { 11 namespace ui {
16 12
17 class CursorFactoryOzone; 13 class CursorFactoryOzone;
18 class EventFactoryOzone; 14 class EventFactoryOzone;
19 class NativeDisplayDelegate; 15 class NativeDisplayDelegate;
16 class SurfaceFactoryOzone;
20 class TouchscreenDeviceManager; 17 class TouchscreenDeviceManager;
21 18
22 // Base class for Ozone platform implementations. 19 // Base class for Ozone platform implementations.
23 // 20 //
24 // Ozone platforms must override this class and implement the virtual 21 // Ozone platforms must override this class and implement the virtual
25 // GetFooFactoryOzone() methods to provide implementations of the 22 // GetFooFactoryOzone() methods to provide implementations of the
26 // various ozone interfaces. 23 // various ozone interfaces.
27 // 24 //
28 // The OzonePlatform subclass can own any state needed by the 25 // The OzonePlatform subclass can own any state needed by the
29 // implementation that is shared between the various ozone interfaces, 26 // implementation that is shared between the various ozone interfaces,
(...skipping 13 matching lines...) Expand all
43 static void InitializeForUI(); 40 static void InitializeForUI();
44 41
45 // Initializes the subsystems/resources necessary for the GPU process. 42 // Initializes the subsystems/resources necessary for the GPU process.
46 static void InitializeForGPU(); 43 static void InitializeForGPU();
47 44
48 static OzonePlatform* GetInstance(); 45 static OzonePlatform* GetInstance();
49 46
50 // Factory getters to override in subclasses. The returned objects will be 47 // Factory getters to override in subclasses. The returned objects will be
51 // injected into the appropriate layer at startup. Subclasses should not 48 // injected into the appropriate layer at startup. Subclasses should not
52 // inject these objects themselves. Ownership is retained by OzonePlatform. 49 // inject these objects themselves. Ownership is retained by OzonePlatform.
53 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; 50 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0;
54 virtual ui::EventFactoryOzone* GetEventFactoryOzone() = 0; 51 virtual ui::EventFactoryOzone* GetEventFactoryOzone() = 0;
55 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; 52 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0;
56 #if defined(OS_CHROMEOS) 53 #if defined(OS_CHROMEOS)
57 virtual scoped_ptr<ui::NativeDisplayDelegate> 54 virtual scoped_ptr<ui::NativeDisplayDelegate>
58 CreateNativeDisplayDelegate() = 0; 55 CreateNativeDisplayDelegate() = 0;
59 virtual scoped_ptr<ui::TouchscreenDeviceManager> 56 virtual scoped_ptr<ui::TouchscreenDeviceManager>
60 CreateTouchscreenDeviceManager() = 0; 57 CreateTouchscreenDeviceManager() = 0;
61 #endif 58 #endif
62 59
63 private: 60 private:
64 virtual void InitializeUI() = 0; 61 virtual void InitializeUI() = 0;
65 virtual void InitializeGPU() = 0; 62 virtual void InitializeGPU() = 0;
66 63
67 static void CreateInstance(); 64 static void CreateInstance();
68 65
69 static OzonePlatform* instance_; 66 static OzonePlatform* instance_;
70 67
71 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); 68 DISALLOW_COPY_AND_ASSIGN(OzonePlatform);
72 }; 69 };
73 70
74 } // namespace ui 71 } // namespace ui
75 72
76 #endif // UI_OZONE_OZONE_PLATFORM_H_ 73 #endif // UI_OZONE_OZONE_PLATFORM_H_
OLDNEW
« no previous file with comments | « ui/ozone/ozone_base_export.h ('k') | ui/ozone/platform/caca/caca_event_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698