| 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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // This class receives requests to change cursor properties, as well as | 35 // This class receives requests to change cursor properties, as well as |
| 36 // requests to queue any further changes until a later time. It sends changes | 36 // requests to queue any further changes until a later time. It sends changes |
| 37 // to the NativeCursorManager, which communicates back to us when these changes | 37 // to the NativeCursorManager, which communicates back to us when these changes |
| 38 // were made through the NativeCursorManagerDelegate interface. | 38 // were made through the NativeCursorManagerDelegate interface. |
| 39 class WM_EXPORT CursorManager : public aura::client::CursorClient, | 39 class WM_EXPORT CursorManager : public aura::client::CursorClient, |
| 40 public NativeCursorManagerDelegate { | 40 public NativeCursorManagerDelegate { |
| 41 public: | 41 public: |
| 42 explicit CursorManager(scoped_ptr<NativeCursorManager> delegate); | 42 explicit CursorManager(scoped_ptr<NativeCursorManager> delegate); |
| 43 ~CursorManager() override; | 43 ~CursorManager() override; |
| 44 | 44 |
| 45 // Resets the last visibility state, etc. Currently only called by tests. |
| 46 static void ResetCursorVisibilityStateForTest(); |
| 47 |
| 45 // Overridden from aura::client::CursorClient: | 48 // Overridden from aura::client::CursorClient: |
| 46 void SetCursor(gfx::NativeCursor) override; | 49 void SetCursor(gfx::NativeCursor) override; |
| 47 gfx::NativeCursor GetCursor() const override; | 50 gfx::NativeCursor GetCursor() const override; |
| 48 void ShowCursor() override; | 51 void ShowCursor() override; |
| 49 void HideCursor() override; | 52 void HideCursor() override; |
| 50 bool IsCursorVisible() const override; | 53 bool IsCursorVisible() const override; |
| 51 void SetCursorSet(ui::CursorSetType cursor_set) override; | 54 void SetCursorSet(ui::CursorSetType cursor_set) override; |
| 52 ui::CursorSetType GetCursorSet() const override; | 55 ui::CursorSetType GetCursorSet() const override; |
| 53 void EnableMouseEvents() override; | 56 void EnableMouseEvents() override; |
| 54 void DisableMouseEvents() override; | 57 void DisableMouseEvents() override; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // CursorManager instance is created it gets populated with the correct | 90 // CursorManager instance is created it gets populated with the correct |
| 88 // cursor visibility state. | 91 // cursor visibility state. |
| 89 static bool last_cursor_visibility_state_; | 92 static bool last_cursor_visibility_state_; |
| 90 | 93 |
| 91 DISALLOW_COPY_AND_ASSIGN(CursorManager); | 94 DISALLOW_COPY_AND_ASSIGN(CursorManager); |
| 92 }; | 95 }; |
| 93 | 96 |
| 94 } // namespace wm | 97 } // namespace wm |
| 95 | 98 |
| 96 #endif // UI_WM_CORE_CURSOR_MANAGER_H_ | 99 #endif // UI_WM_CORE_CURSOR_MANAGER_H_ |
| OLD | NEW |