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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 11888003: Differentiate invisible cursor mode and disabled mouse events mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 11 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: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 5c2bc7bcb4f6c6a79be3fa1a69b5a9ef0d0d519a..f1ecd923ad09056b20daade6f70556e2e2fa53be 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1012,6 +1012,14 @@ void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) {
window_->layer()->SetFillsBoundsOpaquely(background.isOpaque());
}
+void RenderWidgetHostViewAura::ScrollOffsetChanged(
+ const gfx::Vector2d& offset) {
+ aura::client::CursorClient* cursor_client =
+ aura::client::GetCursorClient(window_->GetRootWindow());
+ if (cursor_client && !cursor_client->IsCursorVisible())
+ cursor_client->DisableMouseEvents();
+}
+
void RenderWidgetHostViewAura::GetScreenInfo(WebScreenInfo* results) {
GetScreenInfoForWindow(results, window_);
}
@@ -1071,7 +1079,7 @@ bool RenderWidgetHostViewAura::LockMouse() {
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(root_window);
if (cursor_client)
- cursor_client->DisableMouseEvents();
+ cursor_client->HideCursor();
synthetic_move_sent_ = true;
window_->MoveCursorTo(gfx::Rect(window_->bounds().size()).CenterPoint());
if (aura::client::GetTooltipClient(root_window))
@@ -1091,7 +1099,7 @@ void RenderWidgetHostViewAura::UnlockMouse() {
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(root_window);
if (cursor_client)
- cursor_client->EnableMouseEvents();
+ cursor_client->ShowCursor();
if (aura::client::GetTooltipClient(root_window))
aura::client::GetTooltipClient(root_window)->SetTooltipsEnabled(true);

Powered by Google App Engine
This is Rietveld 408576698