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

Side by Side Diff: ui/views/corewm/cursor_manager.cc

Issue 145313003: Implement cursor compositing mode on Ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get rid of current_cursor_set_ and requested_cursor_set_ Created 6 years, 10 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 | Annotate | Revision Log
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/views/corewm/cursor_manager.h" 5 #include "ui/views/corewm/cursor_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/aura/client/cursor_client_observer.h" 8 #include "ui/aura/client/cursor_client_observer.h"
9 #include "ui/views/corewm/native_cursor_manager.h" 9 #include "ui/views/corewm/native_cursor_manager.h"
10 #include "ui/views/corewm/native_cursor_manager_delegate.h" 10 #include "ui/views/corewm/native_cursor_manager_delegate.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void CursorManager::AddObserver( 200 void CursorManager::AddObserver(
201 aura::client::CursorClientObserver* observer) { 201 aura::client::CursorClientObserver* observer) {
202 observers_.AddObserver(observer); 202 observers_.AddObserver(observer);
203 } 203 }
204 204
205 void CursorManager::RemoveObserver( 205 void CursorManager::RemoveObserver(
206 aura::client::CursorClientObserver* observer) { 206 aura::client::CursorClientObserver* observer) {
207 observers_.RemoveObserver(observer); 207 observers_.RemoveObserver(observer);
208 } 208 }
209 209
210 void CursorManager::SetNativeCursorEnabled(bool enabled) {
211 delegate_->SetNativeCursorEnabled(enabled, this);
212 }
213
210 void CursorManager::CommitCursor(gfx::NativeCursor cursor) { 214 void CursorManager::CommitCursor(gfx::NativeCursor cursor) {
211 current_state_->set_cursor(cursor); 215 current_state_->set_cursor(cursor);
212 } 216 }
213 217
214 void CursorManager::CommitVisibility(bool visible) { 218 void CursorManager::CommitVisibility(bool visible) {
215 // TODO(tdanderson): Find a better place for this so we don't 219 // TODO(tdanderson): Find a better place for this so we don't
216 // notify the observers more than is necessary. 220 // notify the observers more than is necessary.
217 FOR_EACH_OBSERVER(aura::client::CursorClientObserver, observers_, 221 FOR_EACH_OBSERVER(aura::client::CursorClientObserver, observers_,
218 OnCursorVisibilityChanged(visible)); 222 OnCursorVisibilityChanged(visible));
219 current_state_->SetVisible(visible); 223 current_state_->SetVisible(visible);
220 } 224 }
221 225
222 void CursorManager::CommitScale(float scale) { 226 void CursorManager::CommitScale(float scale) {
223 current_state_->set_scale(scale); 227 current_state_->set_scale(scale);
224 } 228 }
225 229
226 void CursorManager::CommitCursorSet(ui::CursorSetType cursor_set) { 230 void CursorManager::CommitCursorSet(ui::CursorSetType cursor_set) {
227 current_state_->set_cursor_set(cursor_set); 231 current_state_->set_cursor_set(cursor_set);
228 } 232 }
229 233
230 void CursorManager::CommitMouseEventsEnabled(bool enabled) { 234 void CursorManager::CommitMouseEventsEnabled(bool enabled) {
231 current_state_->SetMouseEventsEnabled(enabled); 235 current_state_->SetMouseEventsEnabled(enabled);
232 } 236 }
233 237
234 } // namespace corewm 238 } // namespace corewm
235 } // namespace views 239 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698