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

Unified Diff: content/browser/renderer_host/input/input_router_impl.h

Issue 2624783002: Fix movementX/Y attributes for touch pointer events (Closed)
Patch Set: Move the logic to InputRouterImpl 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/input/input_router_impl.h
diff --git a/content/browser/renderer_host/input/input_router_impl.h b/content/browser/renderer_host/input/input_router_impl.h
index 4634b2bc2aa7920c505deca89e95d88e3f063f1a..3281e4496a9ed7aa287bc1a32a55f7b3ed048ce4 100644
--- a/content/browser/renderer_host/input/input_router_impl.h
+++ b/content/browser/renderer_host/input/input_router_impl.h
@@ -68,7 +68,7 @@ class CONTENT_EXPORT InputRouterImpl
const NativeWebKeyboardEventWithLatencyInfo& key_event) override;
void SendGestureEvent(
const GestureEventWithLatencyInfo& gesture_event) override;
- void SendTouchEvent(const TouchEventWithLatencyInfo& touch_event) override;
+ void SendTouchEvent(TouchEventWithLatencyInfo touch_event) override;
const NativeWebKeyboardEvent* GetLastKeyboardEvent() const override;
void NotifySiteIsMobileOptimized(bool is_mobile_optimized) override;
void RequestNotificationWhenFlushed() override;
@@ -87,6 +87,9 @@ class CONTENT_EXPORT InputRouterImpl
FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
MainframeTouchEventRouting);
+ // Keeps track of last position of touch points and sets MovementXY for them.
+ void SetMovementXYForTouchPoints(blink::WebTouchEvent* event);
+
// TouchpadTapSuppressionControllerClient
void SendMouseEventImmediately(
const MouseEventWithLatencyInfo& mouse_event) override;
@@ -260,6 +263,9 @@ class CONTENT_EXPORT InputRouterImpl
float device_scale_factor_;
+ // Last touch position relative to screen. Used to compute movementX/Y.
+ std::map<int, gfx::Point> global_touch_position_;
+
DISALLOW_COPY_AND_ASSIGN(InputRouterImpl);
};

Powered by Google App Engine
This is Rietveld 408576698