| 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 #include "ui/display/display.h" | 8 #include "ui/display/display.h" |
| 9 | 9 |
| 10 namespace aura { | 10 namespace aura { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 for (aura::client::CursorClientObserver& observer : observers_) | 37 for (aura::client::CursorClientObserver& observer : observers_) |
| 38 observer.OnCursorVisibilityChanged(true); | 38 observer.OnCursorVisibilityChanged(true); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void TestCursorClient::HideCursor() { | 41 void TestCursorClient::HideCursor() { |
| 42 visible_ = false; | 42 visible_ = false; |
| 43 for (aura::client::CursorClientObserver& observer : observers_) | 43 for (aura::client::CursorClientObserver& observer : observers_) |
| 44 observer.OnCursorVisibilityChanged(false); | 44 observer.OnCursorVisibilityChanged(false); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void TestCursorClient::SetCursorSet(ui::CursorSetType cursor_set) { | 47 void TestCursorClient::SetCursorSize(ui::CursorSize cursor_size) {} |
| 48 } | |
| 49 | 48 |
| 50 ui::CursorSetType TestCursorClient::GetCursorSet() const { | 49 ui::CursorSize TestCursorClient::GetCursorSize() const { |
| 51 return ui::CURSOR_SET_NORMAL; | 50 return ui::CursorSize::kNormal; |
| 52 } | 51 } |
| 53 | 52 |
| 54 bool TestCursorClient::IsCursorVisible() const { | 53 bool TestCursorClient::IsCursorVisible() const { |
| 55 return visible_; | 54 return visible_; |
| 56 } | 55 } |
| 57 | 56 |
| 58 void TestCursorClient::EnableMouseEvents() { | 57 void TestCursorClient::EnableMouseEvents() { |
| 59 mouse_events_enabled_ = true; | 58 mouse_events_enabled_ = true; |
| 60 } | 59 } |
| 61 | 60 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 observers_.RemoveObserver(observer); | 97 observers_.RemoveObserver(observer); |
| 99 } | 98 } |
| 100 | 99 |
| 101 bool TestCursorClient::ShouldHideCursorOnKeyEvent( | 100 bool TestCursorClient::ShouldHideCursorOnKeyEvent( |
| 102 const ui::KeyEvent& event) const { | 101 const ui::KeyEvent& event) const { |
| 103 return should_hide_cursor_on_key_event_; | 102 return should_hide_cursor_on_key_event_; |
| 104 } | 103 } |
| 105 | 104 |
| 106 } // namespace test | 105 } // namespace test |
| 107 } // namespace aura | 106 } // namespace aura |
| OLD | NEW |