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

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

Issue 2386103004: Ensure that we don't report huge mouse movement deltas for mouse enter and leave events. (Closed)
Patch Set: Update comment Created 4 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: content/browser/renderer_host/render_widget_host_view_aura.h
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 190d5c9f8e1b71677811395019d9762d6fd7e1ee..98657c04df26e99db085784dc031503033212a70 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -424,7 +424,10 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
// This method computes movementX/Y and keeps track of mouse location for
// mouse lock on all mouse move events.
- void ModifyEventMovementAndCoords(blink::WebMouseEvent* event);
+ // |event| contains the WebMouseEvent being modified.
+ // |ui_mouse_event| contains the mouse event received.
+ void ModifyEventMovementAndCoords(blink::WebMouseEvent* event,
+ ui::MouseEvent* ui_mouse_event);
// Sends an IPC to the renderer process to communicate whether or not
// the mouse cursor is visible anywhere on the screen.
@@ -686,6 +689,10 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
int32_t last_active_widget_process_id_;
int32_t last_active_widget_routing_id_;
+ // The last mouse move position. It is used as the location of subsequent
+ // mouse enter and leave events.
+ gfx::Point last_mouse_position_;
+
base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);

Powered by Google App Engine
This is Rietveld 408576698