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

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

Issue 16114003: Don't send touch move to renderer while scrolling (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix the case touch event queue could be empty when GetLatestEvent() is called Created 7 years, 6 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/touch_event_queue.h
diff --git a/content/browser/renderer_host/touch_event_queue.h b/content/browser/renderer_host/touch_event_queue.h
index 8c2a1ad2d0c979e4bcf5774509eef153e4a82f00..5df235bdd3a9d465783102d935f37d873c4d1c72 100644
--- a/content/browser/renderer_host/touch_event_queue.h
+++ b/content/browser/renderer_host/touch_event_queue.h
@@ -37,6 +37,12 @@ class TouchEventQueue {
// additional queued touch-events to the renderer.
void ProcessTouchAck(InputEventAckState ack_result);
+ // On receiving the first GestureScrollUpdate, flushes any touch events in
+ // the queue to view, sends a touch cancel event to the renderer immediately,
+ // and then resets the event queue so as not to process the acked touch cancel
+ // event.
+ void OnGestureScrollStart();
+
// Empties the queue of touch events. This may result in any number of gesture
// events being sent to the renderer.
void FlushQueue();
@@ -68,6 +74,8 @@ class TouchEventQueue {
typedef std::deque<CoalescedWebTouchEvent*> TouchQueue;
TouchQueue touch_queue_;
+ TouchEventWithLatencyInfo latest_event_;
+
// Maintain the ACK status for each touch point.
typedef std::map<int, InputEventAckState> TouchPointAckStates;
TouchPointAckStates touch_ack_states_;

Powered by Google App Engine
This is Rietveld 408576698