Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_BASE_CURSOR_OZONE_CURSOR_FACTORY_OZONE_H_ | 5 #ifndef UI_OZONE_FACTORIES_CURSOR_FACTORY_OZONE_H_ |
| 6 #define UI_BASE_CURSOR_OZONE_CURSOR_FACTORY_OZONE_H_ | 6 #define UI_OZONE_FACTORIES_CURSOR_FACTORY_OZONE_H_ |
| 7 | 7 |
| 8 #include "ui/base/cursor/cursor.h" | |
| 9 #include "ui/base/ui_base_export.h" | |
| 10 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
| 9 #include "ui/ozone/ozone_base_export.h" | |
| 10 | |
| 11 namespace gfx { | |
| 12 class Point; | |
| 13 } | |
| 11 | 14 |
| 12 namespace ui { | 15 namespace ui { |
| 13 | 16 |
| 14 class UI_BASE_EXPORT CursorFactoryOzone { | 17 typedef void* PlatformCursor; |
|
sadrul
2014/06/07 19:16:28
This is somewhat unclean. We could call this Ozone
| |
| 18 | |
| 19 class OZONE_BASE_EXPORT CursorFactoryOzone { | |
| 15 public: | 20 public: |
| 16 CursorFactoryOzone(); | 21 CursorFactoryOzone(); |
| 17 virtual ~CursorFactoryOzone(); | 22 virtual ~CursorFactoryOzone(); |
| 18 | 23 |
| 19 // Returns the singleton instance. | 24 // Returns the singleton instance. |
| 20 static CursorFactoryOzone* GetInstance(); | 25 static CursorFactoryOzone* GetInstance(); |
| 21 | 26 |
| 22 // Return the default cursor of the specified type. The types are listed in | 27 // Return the default cursor of the specified type. The types are listed in |
| 23 // ui/base/cursor/cursor.h. Default cursors are managed by the implementation | 28 // ui/base/cursor/cursor.h. Default cursors are managed by the implementation |
| 24 // and must live indefinitely; there's no way to know when to free them. | 29 // and must live indefinitely; there's no way to know when to free them. |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 42 | 47 |
| 43 // Returns the window on which the cursor is active. | 48 // Returns the window on which the cursor is active. |
| 44 // TODO(dnicoara) Move this once the WindowTreeHost refactoring finishes and | 49 // TODO(dnicoara) Move this once the WindowTreeHost refactoring finishes and |
| 45 // WindowTreeHost::CanDispatchEvent() is no longer present. | 50 // WindowTreeHost::CanDispatchEvent() is no longer present. |
| 46 virtual gfx::AcceleratedWidget GetCursorWindow(); | 51 virtual gfx::AcceleratedWidget GetCursorWindow(); |
| 47 | 52 |
| 48 private: | 53 private: |
| 49 static CursorFactoryOzone* impl_; // not owned | 54 static CursorFactoryOzone* impl_; // not owned |
| 50 }; | 55 }; |
| 51 | 56 |
| 52 } // namespace gfx | 57 } // namespace ui |
| 53 | 58 |
| 54 #endif // UI_BASE_CURSOR_OZONE_CURSOR_FACTORY_OZONE_H_ | 59 #endif // UI_OZONE_FACTORIES_CURSOR_FACTORY_OZONE_H_ |
| OLD | NEW |