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

Unified Diff: ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc

Issue 92413002: Cursor state should be global for all CursorManagers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for review Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc
diff --git a/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc b/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc
index eed97f32af54167d7e59bd1919331523bd15e62f..911f775336103d76db481e872e126052bd718649 100644
--- a/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc
@@ -38,7 +38,7 @@ void DesktopNativeCursorManager::SetDisplay(
if (cursor_loader_updater_.get())
cursor_loader_updater_->OnDisplayUpdated(display, cursor_loader_.get());
- SetCursor(delegate->GetCurrentCursor(), delegate);
+ SetCursor(delegate->GetCursor(), delegate);
}
void DesktopNativeCursorManager::SetCursor(
@@ -48,7 +48,7 @@ void DesktopNativeCursorManager::SetCursor(
cursor_loader_->SetPlatformCursor(&new_cursor);
delegate->CommitCursor(new_cursor);
- if (delegate->GetCurrentVisibility())
+ if (delegate->IsCursorVisible())
root_window_->SetCursor(new_cursor);
}
@@ -58,7 +58,7 @@ void DesktopNativeCursorManager::SetVisibility(
delegate->CommitVisibility(visible);
if (visible) {
- SetCursor(delegate->GetCurrentCursor(), delegate);
+ SetCursor(delegate->GetCursor(), delegate);
} else {
gfx::NativeCursor invisible_cursor(ui::kCursorNone);
cursor_loader_->SetPlatformCursor(&invisible_cursor);
@@ -88,7 +88,7 @@ void DesktopNativeCursorManager::SetMouseEventsEnabled(
// TODO(erg): In the ash version, we set the last mouse location on Env. I'm
// not sure this concept makes sense on the desktop.
- SetVisibility(delegate->GetCurrentVisibility(), delegate);
+ SetVisibility(delegate->IsCursorVisible(), delegate);
root_window_->OnMouseEventsEnableStateChanged(enabled);
}

Powered by Google App Engine
This is Rietveld 408576698