| 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/ozone_export.h" | 12 #include "ui/ozone/ozone_export.h" |
| 12 | 13 |
| 13 namespace ui { | 14 namespace ui { |
| 14 | 15 |
| 15 // Base class for Ozone platform implementations. | 16 // Base class for Ozone platform implementations. |
| 16 // | 17 // |
| 17 // Ozone platforms must override this class and implement the virtual | 18 // Ozone platforms must override this class and implement the virtual |
| 18 // GetFooFactoryOzone() methods to provide implementations of the | 19 // GetFooFactoryOzone() methods to provide implementations of the |
| 19 // various ozone interfaces. | 20 // various ozone interfaces. |
| 20 // | 21 // |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 | 34 |
| 34 // Initialize the platform. Once complete, SurfaceFactoryOzone & | 35 // Initialize the platform. Once complete, SurfaceFactoryOzone & |
| 35 // EventFactoryOzone will be set. | 36 // EventFactoryOzone will be set. |
| 36 static void Initialize(); | 37 static void Initialize(); |
| 37 | 38 |
| 38 // Factory getters to override in subclasses. The returned objects will be | 39 // Factory getters to override in subclasses. The returned objects will be |
| 39 // injected into the appropriate layer at startup. Subclasses should not | 40 // injected into the appropriate layer at startup. Subclasses should not |
| 40 // inject these objects themselves. Ownership is retained by OzonePlatform. | 41 // inject these objects themselves. Ownership is retained by OzonePlatform. |
| 41 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; | 42 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; |
| 42 virtual ui::EventFactoryOzone* GetEventFactoryOzone() = 0; | 43 virtual ui::EventFactoryOzone* GetEventFactoryOzone() = 0; |
| 44 virtual ui::InputMethodContextFactoryOzone* |
| 45 GetInputMethodContextFactoryOzone() = 0; |
| 43 | 46 |
| 44 private: | 47 private: |
| 45 static OzonePlatform* instance_; | 48 static OzonePlatform* instance_; |
| 46 | 49 |
| 47 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); | 50 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); |
| 48 }; | 51 }; |
| 49 | 52 |
| 50 } // namespace ui | 53 } // namespace ui |
| 51 | 54 |
| 52 #endif // UI_OZONE_OZONE_PLATFORM_H_ | 55 #endif // UI_OZONE_OZONE_PLATFORM_H_ |
| OLD | NEW |