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

Unified Diff: ash/wm/ash_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: comments addressed 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
« no previous file with comments | « ash/test/cursor_manager_test_api.cc ('k') | ui/aura/client/cursor_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/ash_native_cursor_manager.cc
diff --git a/ash/wm/ash_native_cursor_manager.cc b/ash/wm/ash_native_cursor_manager.cc
index 6753796710be9e967471507e199d31989e158c78..d31579280d1537e0ff2ac0790a2de1338de5fc4b 100644
--- a/ash/wm/ash_native_cursor_manager.cc
+++ b/ash/wm/ash_native_cursor_manager.cc
@@ -62,7 +62,7 @@ void AshNativeCursorManager::SetDisplay(
const gfx::Display& display,
views::corewm::NativeCursorManagerDelegate* delegate) {
if (image_cursors_->SetDisplay(display))
- SetCursor(delegate->GetCurrentCursor(), delegate);
+ SetCursor(delegate->GetCursor(), delegate);
}
void AshNativeCursorManager::SetCursor(
@@ -75,7 +75,7 @@ void AshNativeCursorManager::SetCursor(
delegate->CommitCursor(new_cursor);
- if (delegate->GetCurrentVisibility())
+ if (delegate->IsCursorVisible())
SetCursorOnAllRootWindows(new_cursor);
}
@@ -86,8 +86,8 @@ void AshNativeCursorManager::SetCursorSet(
delegate->CommitCursorSet(cursor_set);
// Sets the cursor to reflect the scale change immediately.
- if (delegate->GetCurrentVisibility())
- SetCursor(delegate->GetCurrentCursor(), delegate);
+ if (delegate->IsCursorVisible())
+ SetCursor(delegate->GetCursor(), delegate);
}
void AshNativeCursorManager::SetScale(
@@ -97,7 +97,7 @@ void AshNativeCursorManager::SetScale(
delegate->CommitScale(scale);
// Sets the cursor to reflect the scale change immediately.
- SetCursor(delegate->GetCurrentCursor(), delegate);
+ SetCursor(delegate->GetCursor(), delegate);
}
void AshNativeCursorManager::SetVisibility(
@@ -106,7 +106,7 @@ void AshNativeCursorManager::SetVisibility(
delegate->CommitVisibility(visible);
if (visible) {
- SetCursor(delegate->GetCurrentCursor(), delegate);
+ SetCursor(delegate->GetCursor(), delegate);
} else {
gfx::NativeCursor invisible_cursor(ui::kCursorNone);
image_cursors_->SetPlatformCursor(&invisible_cursor);
@@ -128,7 +128,7 @@ void AshNativeCursorManager::SetMouseEventsEnabled(
disabled_cursor_location_ = aura::Env::GetInstance()->last_mouse_location();
}
- SetVisibility(delegate->GetCurrentVisibility(), delegate);
+ SetVisibility(delegate->IsCursorVisible(), delegate);
NotifyMouseEventsEnableStateChange(enabled);
}
« no previous file with comments | « ash/test/cursor_manager_test_api.cc ('k') | ui/aura/client/cursor_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698