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_VIEWS_COREWM_CURSOR_MANAGER_H_ | 5 #ifndef UI_VIEWS_COREWM_CURSOR_MANAGER_H_ |
6 #define UI_VIEWS_COREWM_CURSOR_MANAGER_H_ | 6 #define UI_VIEWS_COREWM_CURSOR_MANAGER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 virtual bool IsMouseEventsEnabled() const OVERRIDE; | 54 virtual bool IsMouseEventsEnabled() const OVERRIDE; |
55 virtual void SetDisplay(const gfx::Display& display) OVERRIDE; | 55 virtual void SetDisplay(const gfx::Display& display) OVERRIDE; |
56 virtual void LockCursor() OVERRIDE; | 56 virtual void LockCursor() OVERRIDE; |
57 virtual void UnlockCursor() OVERRIDE; | 57 virtual void UnlockCursor() OVERRIDE; |
58 virtual bool IsCursorLocked() const OVERRIDE; | 58 virtual bool IsCursorLocked() const OVERRIDE; |
59 virtual void AddObserver( | 59 virtual void AddObserver( |
60 aura::client::CursorClientObserver* observer) OVERRIDE; | 60 aura::client::CursorClientObserver* observer) OVERRIDE; |
61 virtual void RemoveObserver( | 61 virtual void RemoveObserver( |
62 aura::client::CursorClientObserver* observer) OVERRIDE; | 62 aura::client::CursorClientObserver* observer) OVERRIDE; |
63 | 63 |
64 void SetNativeCursorEnabled(bool enabled); | |
oshima
2014/02/05 21:49:59
this method should have doc
hshi1
2014/02/05 22:55:58
Done.
| |
65 | |
64 private: | 66 private: |
65 // Overridden from NativeCursorManagerDelegate: | 67 // Overridden from NativeCursorManagerDelegate: |
66 virtual void CommitCursor(gfx::NativeCursor cursor) OVERRIDE; | 68 virtual void CommitCursor(gfx::NativeCursor cursor) OVERRIDE; |
67 virtual void CommitVisibility(bool visible) OVERRIDE; | 69 virtual void CommitVisibility(bool visible) OVERRIDE; |
68 virtual void CommitScale(float scale) OVERRIDE; | 70 virtual void CommitScale(float scale) OVERRIDE; |
69 virtual void CommitCursorSet(ui::CursorSetType cursor_set) OVERRIDE; | 71 virtual void CommitCursorSet(ui::CursorSetType cursor_set) OVERRIDE; |
70 virtual void CommitMouseEventsEnabled(bool enabled) OVERRIDE; | 72 virtual void CommitMouseEventsEnabled(bool enabled) OVERRIDE; |
71 | 73 |
72 scoped_ptr<NativeCursorManager> delegate_; | 74 scoped_ptr<NativeCursorManager> delegate_; |
73 | 75 |
74 // Number of times LockCursor() has been invoked without a corresponding | 76 // Number of times LockCursor() has been invoked without a corresponding |
75 // UnlockCursor(). | 77 // UnlockCursor(). |
76 int cursor_lock_count_; | 78 int cursor_lock_count_; |
77 | 79 |
78 // The current state of the cursor. | 80 // The current state of the cursor. |
79 scoped_ptr<internal::CursorState> current_state_; | 81 scoped_ptr<internal::CursorState> current_state_; |
80 | 82 |
81 // The cursor state to restore when the cursor is unlocked. | 83 // The cursor state to restore when the cursor is unlocked. |
82 scoped_ptr<internal::CursorState> state_on_unlock_; | 84 scoped_ptr<internal::CursorState> state_on_unlock_; |
83 | 85 |
84 ObserverList<aura::client::CursorClientObserver> observers_; | 86 ObserverList<aura::client::CursorClientObserver> observers_; |
85 | 87 |
86 DISALLOW_COPY_AND_ASSIGN(CursorManager); | 88 DISALLOW_COPY_AND_ASSIGN(CursorManager); |
87 }; | 89 }; |
88 | 90 |
89 } // namespace corewm | 91 } // namespace corewm |
90 } // namespace views | 92 } // namespace views |
91 | 93 |
92 #endif // UI_VIEWS_COREWM_CURSOR_MANAGER_H_ | 94 #endif // UI_VIEWS_COREWM_CURSOR_MANAGER_H_ |
OLD | NEW |