OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_AURA_TEST_TEST_CURSOR_CLIENT_H_ | 5 #ifndef UI_AURA_TEST_TEST_CURSOR_CLIENT_H_ |
6 #define UI_AURA_TEST_TEST_CURSOR_CLIENT_H_ | 6 #define UI_AURA_TEST_TEST_CURSOR_CLIENT_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/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // Set whether or not to hide cursor on key events. | 29 // Set whether or not to hide cursor on key events. |
30 void set_should_hide_cursor_on_key_event(bool hide) { | 30 void set_should_hide_cursor_on_key_event(bool hide) { |
31 should_hide_cursor_on_key_event_ = hide; | 31 should_hide_cursor_on_key_event_ = hide; |
32 } | 32 } |
33 | 33 |
34 // Overridden from aura::client::CursorClient: | 34 // Overridden from aura::client::CursorClient: |
35 void SetCursor(gfx::NativeCursor cursor) override; | 35 void SetCursor(gfx::NativeCursor cursor) override; |
36 gfx::NativeCursor GetCursor() const override; | 36 gfx::NativeCursor GetCursor() const override; |
37 void ShowCursor() override; | 37 void ShowCursor() override; |
38 void HideCursor() override; | 38 void HideCursor() override; |
39 void SetCursorSet(ui::CursorSetType cursor_set) override; | 39 void SetCursorSize(ui::CursorSize cursor_size) override; |
40 ui::CursorSetType GetCursorSet() const override; | 40 ui::CursorSize GetCursorSize() const override; |
41 bool IsCursorVisible() const override; | 41 bool IsCursorVisible() const override; |
42 void EnableMouseEvents() override; | 42 void EnableMouseEvents() override; |
43 void DisableMouseEvents() override; | 43 void DisableMouseEvents() override; |
44 bool IsMouseEventsEnabled() const override; | 44 bool IsMouseEventsEnabled() const override; |
45 void SetDisplay(const display::Display& display) override; | 45 void SetDisplay(const display::Display& display) override; |
46 const display::Display& GetDisplay() const override; | 46 const display::Display& GetDisplay() const override; |
47 void LockCursor() override; | 47 void LockCursor() override; |
48 void UnlockCursor() override; | 48 void UnlockCursor() override; |
49 bool IsCursorLocked() const override; | 49 bool IsCursorLocked() const override; |
50 void AddObserver(aura::client::CursorClientObserver* observer) override; | 50 void AddObserver(aura::client::CursorClientObserver* observer) override; |
51 void RemoveObserver(aura::client::CursorClientObserver* observer) override; | 51 void RemoveObserver(aura::client::CursorClientObserver* observer) override; |
52 bool ShouldHideCursorOnKeyEvent(const ui::KeyEvent& event) const override; | 52 bool ShouldHideCursorOnKeyEvent(const ui::KeyEvent& event) const override; |
53 | 53 |
54 private: | 54 private: |
55 bool visible_; | 55 bool visible_; |
56 bool should_hide_cursor_on_key_event_; | 56 bool should_hide_cursor_on_key_event_; |
57 bool mouse_events_enabled_; | 57 bool mouse_events_enabled_; |
58 int cursor_lock_count_; | 58 int cursor_lock_count_; |
59 int calls_to_set_cursor_; | 59 int calls_to_set_cursor_; |
60 base::ObserverList<aura::client::CursorClientObserver> observers_; | 60 base::ObserverList<aura::client::CursorClientObserver> observers_; |
61 aura::Window* root_window_; | 61 aura::Window* root_window_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(TestCursorClient); | 63 DISALLOW_COPY_AND_ASSIGN(TestCursorClient); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace test | 66 } // namespace test |
67 } // namespace aura | 67 } // namespace aura |
68 | 68 |
69 #endif // UI_AURA_TEST_TEST_CURSOR_CLIENT_H_ | 69 #endif // UI_AURA_TEST_TEST_CURSOR_CLIENT_H_ |
OLD | NEW |