| 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/events/ozone/event_factory_ozone.h" | 9 #include "ui/events/ozone/event_factory_ozone.h" |
| 10 #include "ui/gfx/ozone/surface_factory_ozone.h" | 10 #include "ui/gfx/ozone/surface_factory_ozone.h" |
| 11 #include "ui/ozone/ime/input_method_context_factory_ozone.h" | 11 #include "ui/ozone/ime/input_method_context_factory_ozone.h" |
| 12 #include "ui/ozone/ozone_export.h" | 12 #include "ui/ozone/ozone_export.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 class CursorFactoryOzone; | 16 class CursorFactoryOzone; |
| 17 class WindowFactoryOzone; |
| 17 | 18 |
| 18 // Base class for Ozone platform implementations. | 19 // Base class for Ozone platform implementations. |
| 19 // | 20 // |
| 20 // Ozone platforms must override this class and implement the virtual | 21 // Ozone platforms must override this class and implement the virtual |
| 21 // GetFooFactoryOzone() methods to provide implementations of the | 22 // GetFooFactoryOzone() methods to provide implementations of the |
| 22 // various ozone interfaces. | 23 // various ozone interfaces. |
| 23 // | 24 // |
| 24 // The OzonePlatform subclass can own any state needed by the | 25 // The OzonePlatform subclass can own any state needed by the |
| 25 // implementation that is shared between the various ozone interfaces, | 26 // implementation that is shared between the various ozone interfaces, |
| 26 // such as a connection to the windowing system. | 27 // such as a connection to the windowing system. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 39 static void Initialize(); | 40 static void Initialize(); |
| 40 | 41 |
| 41 // Factory getters to override in subclasses. The returned objects will be | 42 // Factory getters to override in subclasses. The returned objects will be |
| 42 // injected into the appropriate layer at startup. Subclasses should not | 43 // injected into the appropriate layer at startup. Subclasses should not |
| 43 // inject these objects themselves. Ownership is retained by OzonePlatform. | 44 // inject these objects themselves. Ownership is retained by OzonePlatform. |
| 44 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; | 45 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; |
| 45 virtual ui::EventFactoryOzone* GetEventFactoryOzone() = 0; | 46 virtual ui::EventFactoryOzone* GetEventFactoryOzone() = 0; |
| 46 virtual ui::InputMethodContextFactoryOzone* | 47 virtual ui::InputMethodContextFactoryOzone* |
| 47 GetInputMethodContextFactoryOzone() = 0; | 48 GetInputMethodContextFactoryOzone() = 0; |
| 48 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; | 49 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; |
| 50 virtual ui::WindowFactoryOzone* GetWindowFactoryOzone() = 0; |
| 49 | 51 |
| 50 private: | 52 private: |
| 51 static OzonePlatform* instance_; | 53 static OzonePlatform* instance_; |
| 52 | 54 |
| 53 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); | 55 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); |
| 54 }; | 56 }; |
| 55 | 57 |
| 56 } // namespace ui | 58 } // namespace ui |
| 57 | 59 |
| 58 #endif // UI_OZONE_OZONE_PLATFORM_H_ | 60 #endif // UI_OZONE_OZONE_PLATFORM_H_ |
| OLD | NEW |