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

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

Issue 2624783002: Fix movementX/Y attributes for touch pointer events (Closed)
Patch Set: Initialize m_frameScale in PointerEventFactoryTest Created 3 years, 10 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_base.h
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index b7e0cda7766034cfe42ee7698329d66fe6aefed0..8d93b66d9dd4b0572943457f8d8b321c2eae7e23 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -108,6 +108,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
void FocusedNodeTouched(const gfx::Point& location_dips_screen,
bool editable) override;
+ // Keeps track of last position of touch points and sets MovementXY for them.
+ void SetMovementXYForTouchPoints(blink::WebTouchEvent* event);
+
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
gfx::Point TransformPointToRootCoordSpace(const gfx::Point& point) override;
@@ -482,6 +485,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
+ // Last touch position relative to screen. Used to compute movementX/Y.
+ std::map<int, gfx::Point> global_touch_position_;
Rick Byers 2017/02/06 22:00:53 Is there a reason to put this here instead of in R
Navid Zolghadr 2017/02/06 22:40:41 I asked about this from jonross@. He mentioned Ren
sadrul 2017/02/07 03:48:30 Can this live in InputRouterImpl instead? Ideally,
Navid Zolghadr 2017/02/07 15:43:05 The reason I added it here is mostly because I wan
Navid Zolghadr 2017/02/08 17:18:49 Done. I haven't moved the mouse one yet. But I'll
+
base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);

Powered by Google App Engine
This is Rietveld 408576698