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

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: 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 ca49603dcad0ff35f113fbbb4ae6a6cb27ed23d7..ddef0ab7e8aefd2fe3f54a5c245db02dc3d4ef84 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1019,6 +1019,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_);
}
@@ -1078,7 +1086,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))
@@ -1098,7 +1106,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