Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: ui/aura/test/test_cursor_client.cc

Issue 2833163002: Change ui cursor identifiers to an enum class. (Closed)
Patch Set: OK, it can't be explicit for mac. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/aura/mus/window_port_mus.h ('k') | ui/aura/window_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/aura/mus/window_port_mus.h ('k') | ui/aura/window_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698