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

Unified Diff: ash/magnifier/magnification_controller.cc

Issue 11035050: Enable CursorManager::LockCursor to lock cursor visibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ash/magnifier/magnification_controller.cc
diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc
index 58166ead99dd13dee8f407b0d17cfee24279bf08..9ec04c6834a323ea6110a96af89fb515733a9f67 100644
--- a/ash/magnifier/magnification_controller.cc
+++ b/ash/magnifier/magnification_controller.cc
@@ -6,6 +6,7 @@
#include "ash/shell.h"
#include "ash/shell_delegate.h"
+#include "ui/aura/client/cursor_client.h"
#include "ui/aura/event_filter.h"
#include "ui/aura/root_window.h"
#include "ui/aura/shared/compound_event_filter.h"
@@ -309,7 +310,10 @@ void MagnificationControllerImpl::OnMouseMove(const gfx::Point& location) {
int y_diff = origin_.y() - window_rect.y();
// If the magnified region is moved, hides the mouse cursor and moves it.
if (x_diff != 0 || y_diff != 0) {
- root_window_->ShowCursor(false);
+ aura::client::CursorClient* cursor_client =
+ aura::client::GetCursorClient(root_window_);
+ if (cursor_client)
+ cursor_client->ShowCursor(false);
mouse.set_x(mouse.x() - (origin_.x() - window_rect.x()));
mouse.set_y(mouse.y() - (origin_.y() - window_rect.y()));
root_window_->MoveCursorTo(mouse);
@@ -352,7 +356,10 @@ void MagnificationControllerImpl::ValidateScale(float* scale) {
}
void MagnificationControllerImpl::OnImplicitAnimationsCompleted() {
- root_window_->ShowCursor(true);
+ aura::client::CursorClient* cursor_client =
+ aura::client::GetCursorClient(root_window_);
+ if (cursor_client)
+ cursor_client->ShowCursor(true);
is_on_zooming_ = false;
}
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/shell.h » ('j') | ash/wm/cursor_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698