OLD | NEW |
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/display/types/chromeos/native_display_delegate.h" |
9 #include "ui/events/ozone/event_factory_ozone.h" | 10 #include "ui/events/ozone/event_factory_ozone.h" |
10 #include "ui/gfx/ozone/surface_factory_ozone.h" | 11 #include "ui/gfx/ozone/surface_factory_ozone.h" |
11 #include "ui/ozone/ime/input_method_context_factory_ozone.h" | 12 #include "ui/ozone/ime/input_method_context_factory_ozone.h" |
12 #include "ui/ozone/ozone_export.h" | 13 #include "ui/ozone/ozone_export.h" |
13 | 14 |
14 namespace ui { | 15 namespace ui { |
15 | 16 |
16 class CursorFactoryOzone; | 17 class CursorFactoryOzone; |
17 | 18 |
18 // Base class for Ozone platform implementations. | 19 // Base class for Ozone platform implementations. |
(...skipping 12 matching lines...) Expand all Loading... |
31 // line flags, or whatever is appropriate for the platform. | 32 // line flags, or whatever is appropriate for the platform. |
32 class OZONE_EXPORT OzonePlatform { | 33 class OZONE_EXPORT OzonePlatform { |
33 public: | 34 public: |
34 OzonePlatform(); | 35 OzonePlatform(); |
35 virtual ~OzonePlatform(); | 36 virtual ~OzonePlatform(); |
36 | 37 |
37 // Initialize the platform. Once complete, SurfaceFactoryOzone & | 38 // Initialize the platform. Once complete, SurfaceFactoryOzone & |
38 // EventFactoryOzone will be set. | 39 // EventFactoryOzone will be set. |
39 static void Initialize(); | 40 static void Initialize(); |
40 | 41 |
| 42 static OzonePlatform* GetInstance(); |
| 43 |
41 // Factory getters to override in subclasses. The returned objects will be | 44 // Factory getters to override in subclasses. The returned objects will be |
42 // injected into the appropriate layer at startup. Subclasses should not | 45 // injected into the appropriate layer at startup. Subclasses should not |
43 // inject these objects themselves. Ownership is retained by OzonePlatform. | 46 // inject these objects themselves. Ownership is retained by OzonePlatform. |
44 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; | 47 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; |
45 virtual ui::EventFactoryOzone* GetEventFactoryOzone() = 0; | 48 virtual ui::EventFactoryOzone* GetEventFactoryOzone() = 0; |
46 virtual ui::InputMethodContextFactoryOzone* | 49 virtual ui::InputMethodContextFactoryOzone* |
47 GetInputMethodContextFactoryOzone() = 0; | 50 GetInputMethodContextFactoryOzone() = 0; |
48 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; | 51 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; |
| 52 virtual ui::NativeDisplayDelegate* CreateNativeDisplayDelegate() = 0; |
49 | 53 |
50 private: | 54 private: |
51 static OzonePlatform* instance_; | 55 static OzonePlatform* instance_; |
52 | 56 |
53 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); | 57 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); |
54 }; | 58 }; |
55 | 59 |
56 } // namespace ui | 60 } // namespace ui |
57 | 61 |
58 #endif // UI_OZONE_OZONE_PLATFORM_H_ | 62 #endif // UI_OZONE_OZONE_PLATFORM_H_ |
OLD | NEW |