| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/wm/test/testing_cursor_client_observer.h" | 5 #include "ui/wm/test/testing_cursor_client_observer.h" |
| 6 | 6 |
| 7 namespace wm { | 7 namespace wm { |
| 8 | 8 |
| 9 TestingCursorClientObserver::TestingCursorClientObserver() | 9 TestingCursorClientObserver::TestingCursorClientObserver() |
| 10 : cursor_visibility_(false), | 10 : cursor_visibility_(false), |
| 11 did_visibility_change_(false), | 11 did_visibility_change_(false), |
| 12 cursor_set_(ui::CURSOR_SET_NORMAL), | 12 cursor_size_(ui::CursorSize::kNormal), |
| 13 did_cursor_set_change_(false) {} | 13 did_cursor_size_change_(false) {} |
| 14 | 14 |
| 15 void TestingCursorClientObserver::reset() { | 15 void TestingCursorClientObserver::reset() { |
| 16 cursor_visibility_ = did_visibility_change_ = false; | 16 cursor_visibility_ = did_visibility_change_ = false; |
| 17 cursor_set_ = ui::CURSOR_SET_NORMAL; | 17 cursor_size_ = ui::CursorSize::kNormal; |
| 18 did_cursor_set_change_ = false; | 18 did_cursor_size_change_ = false; |
| 19 } | 19 } |
| 20 | 20 |
| 21 void TestingCursorClientObserver::OnCursorVisibilityChanged(bool is_visible) { | 21 void TestingCursorClientObserver::OnCursorVisibilityChanged(bool is_visible) { |
| 22 cursor_visibility_ = is_visible; | 22 cursor_visibility_ = is_visible; |
| 23 did_visibility_change_ = true; | 23 did_visibility_change_ = true; |
| 24 } | 24 } |
| 25 | 25 |
| 26 void TestingCursorClientObserver::OnCursorSetChanged( | 26 void TestingCursorClientObserver::OnCursorSizeChanged( |
| 27 ui::CursorSetType cursor_set) { | 27 ui::CursorSize cursor_size) { |
| 28 cursor_set_ = cursor_set; | 28 cursor_size_ = cursor_size; |
| 29 did_cursor_set_change_ = true; | 29 did_cursor_size_change_ = true; |
| 30 } | 30 } |
| 31 | 31 |
| 32 } // namespace wm | 32 } // namespace wm |
| OLD | NEW |