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/aura/client/cursor_client_observer.h" | 5 #include "ui/aura/client/cursor_client_observer.h" |
6 #include "ui/wm/core/cursor_manager.h" | 6 #include "ui/wm/core/cursor_manager.h" |
7 | 7 |
8 namespace wm { | 8 namespace wm { |
9 | 9 |
10 // CursorClientObserver for testing. | 10 // CursorClientObserver for testing. |
11 class TestingCursorClientObserver : public aura::client::CursorClientObserver { | 11 class TestingCursorClientObserver : public aura::client::CursorClientObserver { |
12 public: | 12 public: |
13 TestingCursorClientObserver(); | 13 TestingCursorClientObserver(); |
14 void reset(); | 14 void reset(); |
15 | 15 |
16 bool is_cursor_visible() const { return cursor_visibility_; } | 16 bool is_cursor_visible() const { return cursor_visibility_; } |
17 bool did_visibility_change() const { return did_visibility_change_; } | 17 bool did_visibility_change() const { return did_visibility_change_; } |
18 ui::CursorSetType cursor_set() const { return cursor_set_; } | 18 ui::CursorSize cursor_size() const { return cursor_size_; } |
19 bool did_cursor_set_change() const { return did_cursor_set_change_; } | 19 bool did_cursor_size_change() const { return did_cursor_size_change_; } |
20 | 20 |
21 // Overridden from aura::client::CursorClientObserver: | 21 // Overridden from aura::client::CursorClientObserver: |
22 void OnCursorVisibilityChanged(bool is_visible) override; | 22 void OnCursorVisibilityChanged(bool is_visible) override; |
23 void OnCursorSetChanged(ui::CursorSetType cursor_set) override; | 23 void OnCursorSizeChanged(ui::CursorSize cursor_size) override; |
24 | 24 |
25 private: | 25 private: |
26 bool cursor_visibility_; | 26 bool cursor_visibility_; |
27 bool did_visibility_change_; | 27 bool did_visibility_change_; |
28 ui::CursorSetType cursor_set_; | 28 ui::CursorSize cursor_size_; |
29 bool did_cursor_set_change_; | 29 bool did_cursor_size_change_; |
30 | 30 |
31 DISALLOW_COPY_AND_ASSIGN(TestingCursorClientObserver); | 31 DISALLOW_COPY_AND_ASSIGN(TestingCursorClientObserver); |
32 }; | 32 }; |
33 | 33 |
34 } // namespace wm | 34 } // namespace wm |
OLD | NEW |