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 10 matching lines...) Expand all Loading... |
21 | 21 |
22 TestCursorClient::~TestCursorClient() { | 22 TestCursorClient::~TestCursorClient() { |
23 client::SetCursorClient(root_window_, NULL); | 23 client::SetCursorClient(root_window_, NULL); |
24 } | 24 } |
25 | 25 |
26 void TestCursorClient::SetCursor(gfx::NativeCursor cursor) { | 26 void TestCursorClient::SetCursor(gfx::NativeCursor cursor) { |
27 calls_to_set_cursor_++; | 27 calls_to_set_cursor_++; |
28 } | 28 } |
29 | 29 |
30 gfx::NativeCursor TestCursorClient::GetCursor() const { | 30 gfx::NativeCursor TestCursorClient::GetCursor() const { |
31 return ui::kCursorNull; | 31 return ui::CursorType::kNull; |
32 } | 32 } |
33 | 33 |
34 void TestCursorClient::ShowCursor() { | 34 void TestCursorClient::ShowCursor() { |
35 visible_ = true; | 35 visible_ = true; |
36 for (aura::client::CursorClientObserver& observer : observers_) | 36 for (aura::client::CursorClientObserver& observer : observers_) |
37 observer.OnCursorVisibilityChanged(true); | 37 observer.OnCursorVisibilityChanged(true); |
38 } | 38 } |
39 | 39 |
40 void TestCursorClient::HideCursor() { | 40 void TestCursorClient::HideCursor() { |
41 visible_ = false; | 41 visible_ = false; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 observers_.RemoveObserver(observer); | 92 observers_.RemoveObserver(observer); |
93 } | 93 } |
94 | 94 |
95 bool TestCursorClient::ShouldHideCursorOnKeyEvent( | 95 bool TestCursorClient::ShouldHideCursorOnKeyEvent( |
96 const ui::KeyEvent& event) const { | 96 const ui::KeyEvent& event) const { |
97 return should_hide_cursor_on_key_event_; | 97 return should_hide_cursor_on_key_event_; |
98 } | 98 } |
99 | 99 |
100 } // namespace test | 100 } // namespace test |
101 } // namespace aura | 101 } // namespace aura |
OLD | NEW |