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

Side by Side Diff: ui/wm/core/cursor_manager.cc

Issue 2071553002: Initial support of large mouse cursor on Exosphere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add dependency to wm::test_support from ash::unittests Created 4 years, 5 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/wm/BUILD.gn ('k') | ui/wm/core/cursor_manager_unittest.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/wm/core/cursor_manager.h" 5 #include "ui/wm/core/cursor_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 OnCursorVisibilityChanged(false)); 125 OnCursorVisibilityChanged(false));
126 } 126 }
127 } 127 }
128 128
129 bool CursorManager::IsCursorVisible() const { 129 bool CursorManager::IsCursorVisible() const {
130 return current_state_->visible(); 130 return current_state_->visible();
131 } 131 }
132 132
133 void CursorManager::SetCursorSet(ui::CursorSetType cursor_set) { 133 void CursorManager::SetCursorSet(ui::CursorSetType cursor_set) {
134 state_on_unlock_->set_cursor_set(cursor_set); 134 state_on_unlock_->set_cursor_set(cursor_set);
135 if (GetCursorSet() != state_on_unlock_->cursor_set()) 135 if (GetCursorSet() != state_on_unlock_->cursor_set()) {
136 delegate_->SetCursorSet(state_on_unlock_->cursor_set(), this); 136 delegate_->SetCursorSet(state_on_unlock_->cursor_set(), this);
137 FOR_EACH_OBSERVER(aura::client::CursorClientObserver, observers_,
138 OnCursorSetChanged(cursor_set));
139 }
137 } 140 }
138 141
139 ui::CursorSetType CursorManager::GetCursorSet() const { 142 ui::CursorSetType CursorManager::GetCursorSet() const {
140 return current_state_->cursor_set(); 143 return current_state_->cursor_set();
141 } 144 }
142 145
143 void CursorManager::EnableMouseEvents() { 146 void CursorManager::EnableMouseEvents() {
144 state_on_unlock_->SetMouseEventsEnabled(true); 147 state_on_unlock_->SetMouseEventsEnabled(true);
145 if (cursor_lock_count_ == 0 && 148 if (cursor_lock_count_ == 0 &&
146 IsMouseEventsEnabled() != state_on_unlock_->mouse_events_enabled()) { 149 IsMouseEventsEnabled() != state_on_unlock_->mouse_events_enabled()) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 225
223 void CursorManager::CommitCursorSet(ui::CursorSetType cursor_set) { 226 void CursorManager::CommitCursorSet(ui::CursorSetType cursor_set) {
224 current_state_->set_cursor_set(cursor_set); 227 current_state_->set_cursor_set(cursor_set);
225 } 228 }
226 229
227 void CursorManager::CommitMouseEventsEnabled(bool enabled) { 230 void CursorManager::CommitMouseEventsEnabled(bool enabled) {
228 current_state_->SetMouseEventsEnabled(enabled); 231 current_state_->SetMouseEventsEnabled(enabled);
229 } 232 }
230 233
231 } // namespace wm 234 } // namespace wm
OLDNEW
« no previous file with comments | « ui/wm/BUILD.gn ('k') | ui/wm/core/cursor_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698