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 #include "ui/aura/test/test_cursor_client.h" | 5 #include "ui/aura/test/test_cursor_client.h" |
6 | 6 |
7 #include "ui/aura/client/cursor_client_observer.h" | 7 #include "ui/aura/client/cursor_client_observer.h" |
8 | 8 |
9 namespace aura { | 9 namespace aura { |
10 namespace test { | 10 namespace test { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 } | 59 } |
60 | 60 |
61 void TestCursorClient::DisableMouseEvents() { | 61 void TestCursorClient::DisableMouseEvents() { |
62 mouse_events_enabled_ = false; | 62 mouse_events_enabled_ = false; |
63 } | 63 } |
64 | 64 |
65 bool TestCursorClient::IsMouseEventsEnabled() const { | 65 bool TestCursorClient::IsMouseEventsEnabled() const { |
66 return mouse_events_enabled_; | 66 return mouse_events_enabled_; |
67 } | 67 } |
68 | 68 |
69 void TestCursorClient::SetDisplay(const gfx::Display& display) { | 69 void TestCursorClient::SetDisplay(const display::Display& display) {} |
70 } | |
71 | 70 |
72 void TestCursorClient::LockCursor() { | 71 void TestCursorClient::LockCursor() { |
73 cursor_lock_count_++; | 72 cursor_lock_count_++; |
74 } | 73 } |
75 | 74 |
76 void TestCursorClient::UnlockCursor() { | 75 void TestCursorClient::UnlockCursor() { |
77 cursor_lock_count_--; | 76 cursor_lock_count_--; |
78 if (cursor_lock_count_ < 0) | 77 if (cursor_lock_count_ < 0) |
79 cursor_lock_count_ = 0; | 78 cursor_lock_count_ = 0; |
80 } | 79 } |
(...skipping 12 matching lines...) Expand all Loading... |
93 observers_.RemoveObserver(observer); | 92 observers_.RemoveObserver(observer); |
94 } | 93 } |
95 | 94 |
96 bool TestCursorClient::ShouldHideCursorOnKeyEvent( | 95 bool TestCursorClient::ShouldHideCursorOnKeyEvent( |
97 const ui::KeyEvent& event) const { | 96 const ui::KeyEvent& event) const { |
98 return should_hide_cursor_on_key_event_; | 97 return should_hide_cursor_on_key_event_; |
99 } | 98 } |
100 | 99 |
101 } // namespace test | 100 } // namespace test |
102 } // namespace aura | 101 } // namespace aura |
OLD | NEW |