OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_WM_CORE_NATIVE_CURSOR_MANAGER_H_ | 5 #ifndef UI_WM_CORE_NATIVE_CURSOR_MANAGER_H_ |
6 #define UI_WM_CORE_NATIVE_CURSOR_MANAGER_H_ | 6 #define UI_WM_CORE_NATIVE_CURSOR_MANAGER_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "ui/base/cursor/cursor.h" |
9 #include "ui/wm/core/native_cursor_manager_delegate.h" | 10 #include "ui/wm/core/native_cursor_manager_delegate.h" |
10 #include "ui/wm/wm_export.h" | 11 #include "ui/wm/wm_export.h" |
11 | 12 |
12 namespace gfx { | 13 namespace gfx { |
13 class Display; | 14 class Display; |
14 } | 15 } |
15 | 16 |
16 namespace wm { | 17 namespace wm { |
17 | 18 |
18 // Interface where platforms such as Ash or Desktop aura are notified of | 19 // Interface where platforms such as Ash or Desktop aura are notified of |
19 // requested changes to cursor state. When requested, implementer should tell | 20 // requested changes to cursor state. When requested, implementer should tell |
20 // the CursorManager of any actual state changes performed through the | 21 // the CursorManager of any actual state changes performed through the |
21 // delegate. | 22 // delegate. |
22 class WM_EXPORT NativeCursorManager { | 23 class WM_EXPORT NativeCursorManager { |
23 public: | 24 public: |
24 virtual ~NativeCursorManager() {} | 25 virtual ~NativeCursorManager() {} |
25 | 26 |
26 // A request to set the screen DPI. Can cause changes in the current cursor. | 27 // A request to set the screen DPI. Can cause changes in the current cursor. |
27 virtual void SetDisplay( | 28 virtual void SetDisplay( |
28 const gfx::Display& display, | 29 const gfx::Display& display, |
29 wm::NativeCursorManagerDelegate* delegate) = 0; | 30 NativeCursorManagerDelegate* delegate) = 0; |
30 | 31 |
31 // A request to set the cursor to |cursor|. At minimum, implementer should | 32 // A request to set the cursor to |cursor|. At minimum, implementer should |
32 // call NativeCursorManagerDelegate::CommitCursor() with whatever cursor is | 33 // call NativeCursorManagerDelegate::CommitCursor() with whatever cursor is |
33 // actually used. | 34 // actually used. |
34 virtual void SetCursor( | 35 virtual void SetCursor( |
35 gfx::NativeCursor cursor, | 36 gfx::NativeCursor cursor, |
36 wm::NativeCursorManagerDelegate* delegate) = 0; | 37 NativeCursorManagerDelegate* delegate) = 0; |
37 | 38 |
38 // A request to set the visibility of the cursor. At minimum, implementer | 39 // A request to set the visibility of the cursor. At minimum, implementer |
39 // should call NativeCursorManagerDelegate::CommitVisibility() with whatever | 40 // should call NativeCursorManagerDelegate::CommitVisibility() with whatever |
40 // the visibility is. | 41 // the visibility is. |
41 virtual void SetVisibility( | 42 virtual void SetVisibility( |
42 bool visible, | 43 bool visible, |
43 wm::NativeCursorManagerDelegate* delegate) = 0; | 44 NativeCursorManagerDelegate* delegate) = 0; |
44 | 45 |
45 // A request to set the cursor set. | 46 // A request to set the cursor set. |
46 virtual void SetCursorSet( | 47 virtual void SetCursorSet( |
47 ui::CursorSetType cursor_set, | 48 ui::CursorSetType cursor_set, |
48 wm::NativeCursorManagerDelegate* delegate) = 0; | 49 NativeCursorManagerDelegate* delegate) = 0; |
49 | 50 |
50 // A request to set whether mouse events are disabled. At minimum, | 51 // A request to set whether mouse events are disabled. At minimum, |
51 // implementer should call NativeCursorManagerDelegate:: | 52 // implementer should call NativeCursorManagerDelegate:: |
52 // CommitMouseEventsEnabled() with whether mouse events are actually enabled. | 53 // CommitMouseEventsEnabled() with whether mouse events are actually enabled. |
53 virtual void SetMouseEventsEnabled( | 54 virtual void SetMouseEventsEnabled( |
54 bool enabled, | 55 bool enabled, |
55 wm::NativeCursorManagerDelegate* delegate) = 0; | 56 NativeCursorManagerDelegate* delegate) = 0; |
56 }; | 57 }; |
57 | 58 |
58 } // namespace wm | 59 } // namespace wm |
59 | 60 |
60 #endif // UI_WM_CORE_NATIVE_CURSOR_MANAGER_H_ | 61 #endif // UI_WM_CORE_NATIVE_CURSOR_MANAGER_H_ |
OLD | NEW |