| 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_CURSOR_MANAGER_H_ | 5 #ifndef UI_WM_CORE_CURSOR_MANAGER_H_ |
| 6 #define UI_WM_CORE_CURSOR_MANAGER_H_ | 6 #define UI_WM_CORE_CURSOR_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "ui/aura/client/cursor_client.h" | 13 #include "ui/aura/client/cursor_client.h" |
| 14 #include "ui/base/cursor/cursor.h" | 14 #include "ui/base/cursor/cursor.h" |
| 15 #include "ui/gfx/geometry/point.h" | 15 #include "ui/gfx/geometry/point.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 17 #include "ui/wm/core/native_cursor_manager_delegate.h" | 17 #include "ui/wm/core/native_cursor_manager_delegate.h" |
| 18 #include "ui/wm/wm_export.h" | 18 #include "ui/wm/wm_export.h" |
| 19 | 19 |
| 20 namespace gfx { | |
| 21 class Display; | |
| 22 } | |
| 23 | |
| 24 namespace ui { | 20 namespace ui { |
| 25 class KeyEvent; | 21 class KeyEvent; |
| 26 } | 22 } |
| 27 | 23 |
| 28 namespace wm { | 24 namespace wm { |
| 29 | 25 |
| 30 namespace internal { | 26 namespace internal { |
| 31 class CursorState; | 27 class CursorState; |
| 32 } | 28 } |
| 33 | 29 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 50 void SetCursor(gfx::NativeCursor) override; | 46 void SetCursor(gfx::NativeCursor) override; |
| 51 gfx::NativeCursor GetCursor() const override; | 47 gfx::NativeCursor GetCursor() const override; |
| 52 void ShowCursor() override; | 48 void ShowCursor() override; |
| 53 void HideCursor() override; | 49 void HideCursor() override; |
| 54 bool IsCursorVisible() const override; | 50 bool IsCursorVisible() const override; |
| 55 void SetCursorSet(ui::CursorSetType cursor_set) override; | 51 void SetCursorSet(ui::CursorSetType cursor_set) override; |
| 56 ui::CursorSetType GetCursorSet() const override; | 52 ui::CursorSetType GetCursorSet() const override; |
| 57 void EnableMouseEvents() override; | 53 void EnableMouseEvents() override; |
| 58 void DisableMouseEvents() override; | 54 void DisableMouseEvents() override; |
| 59 bool IsMouseEventsEnabled() const override; | 55 bool IsMouseEventsEnabled() const override; |
| 60 void SetDisplay(const gfx::Display& display) override; | 56 void SetDisplay(const display::Display& display) override; |
| 61 void LockCursor() override; | 57 void LockCursor() override; |
| 62 void UnlockCursor() override; | 58 void UnlockCursor() override; |
| 63 bool IsCursorLocked() const override; | 59 bool IsCursorLocked() const override; |
| 64 void AddObserver(aura::client::CursorClientObserver* observer) override; | 60 void AddObserver(aura::client::CursorClientObserver* observer) override; |
| 65 void RemoveObserver(aura::client::CursorClientObserver* observer) override; | 61 void RemoveObserver(aura::client::CursorClientObserver* observer) override; |
| 66 bool ShouldHideCursorOnKeyEvent(const ui::KeyEvent& event) const override; | 62 bool ShouldHideCursorOnKeyEvent(const ui::KeyEvent& event) const override; |
| 67 | 63 |
| 68 private: | 64 private: |
| 69 // Overridden from NativeCursorManagerDelegate: | 65 // Overridden from NativeCursorManagerDelegate: |
| 70 void CommitCursor(gfx::NativeCursor cursor) override; | 66 void CommitCursor(gfx::NativeCursor cursor) override; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 91 // CursorManager instance is created it gets populated with the correct | 87 // CursorManager instance is created it gets populated with the correct |
| 92 // cursor visibility state. | 88 // cursor visibility state. |
| 93 static bool last_cursor_visibility_state_; | 89 static bool last_cursor_visibility_state_; |
| 94 | 90 |
| 95 DISALLOW_COPY_AND_ASSIGN(CursorManager); | 91 DISALLOW_COPY_AND_ASSIGN(CursorManager); |
| 96 }; | 92 }; |
| 97 | 93 |
| 98 } // namespace wm | 94 } // namespace wm |
| 99 | 95 |
| 100 #endif // UI_WM_CORE_CURSOR_MANAGER_H_ | 96 #endif // UI_WM_CORE_CURSOR_MANAGER_H_ |
| OLD | NEW |