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

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

Issue 2780623002: exo: Fix multi-display hardware cursor (Closed)
Patch Set: Fix style error Created 3 years, 6 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/test/test_cursor_client.h ('k') | ui/wm/core/cursor_manager.h » ('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 #include "ui/display/display.h"
8 9
9 namespace aura { 10 namespace aura {
10 namespace test { 11 namespace test {
11 12
12 TestCursorClient::TestCursorClient(aura::Window* root_window) 13 TestCursorClient::TestCursorClient(aura::Window* root_window)
13 : visible_(true), 14 : visible_(true),
14 should_hide_cursor_on_key_event_(true), 15 should_hide_cursor_on_key_event_(true),
15 mouse_events_enabled_(true), 16 mouse_events_enabled_(true),
16 cursor_lock_count_(0), 17 cursor_lock_count_(0),
17 calls_to_set_cursor_(0), 18 calls_to_set_cursor_(0),
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void TestCursorClient::DisableMouseEvents() { 62 void TestCursorClient::DisableMouseEvents() {
62 mouse_events_enabled_ = false; 63 mouse_events_enabled_ = false;
63 } 64 }
64 65
65 bool TestCursorClient::IsMouseEventsEnabled() const { 66 bool TestCursorClient::IsMouseEventsEnabled() const {
66 return mouse_events_enabled_; 67 return mouse_events_enabled_;
67 } 68 }
68 69
69 void TestCursorClient::SetDisplay(const display::Display& display) {} 70 void TestCursorClient::SetDisplay(const display::Display& display) {}
70 71
72 const display::Display& TestCursorClient::GetDisplay() const {
73 static const display::Display display;
74 return display;
75 }
76
71 void TestCursorClient::LockCursor() { 77 void TestCursorClient::LockCursor() {
72 cursor_lock_count_++; 78 cursor_lock_count_++;
73 } 79 }
74 80
75 void TestCursorClient::UnlockCursor() { 81 void TestCursorClient::UnlockCursor() {
76 cursor_lock_count_--; 82 cursor_lock_count_--;
77 if (cursor_lock_count_ < 0) 83 if (cursor_lock_count_ < 0)
78 cursor_lock_count_ = 0; 84 cursor_lock_count_ = 0;
79 } 85 }
80 86
(...skipping 11 matching lines...) Expand all
92 observers_.RemoveObserver(observer); 98 observers_.RemoveObserver(observer);
93 } 99 }
94 100
95 bool TestCursorClient::ShouldHideCursorOnKeyEvent( 101 bool TestCursorClient::ShouldHideCursorOnKeyEvent(
96 const ui::KeyEvent& event) const { 102 const ui::KeyEvent& event) const {
97 return should_hide_cursor_on_key_event_; 103 return should_hide_cursor_on_key_event_;
98 } 104 }
99 105
100 } // namespace test 106 } // namespace test
101 } // namespace aura 107 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/test_cursor_client.h ('k') | ui/wm/core/cursor_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698