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

Unified Diff: content/browser/renderer_host/input/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: rebase/switch to model of "no-touch-while-scrolling & touch-end after scrolling stops" Created 7 years, 4 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/touch_event_queue.h
diff --git a/content/browser/renderer_host/input/touch_event_queue.h b/content/browser/renderer_host/input/touch_event_queue.h
index 7d623442936ac33e5d9c92935bd9767a5efb3863..b825c43b281bd8f999c82c110d3d05774712505d 100644
--- a/content/browser/renderer_host/input/touch_event_queue.h
+++ b/content/browser/renderer_host/input/touch_event_queue.h
@@ -51,6 +51,14 @@ class TouchEventQueue {
// additional queued touch-events to the renderer.
void ProcessTouchAck(InputEventAckState ack_result);
+ // When scroll starts, we stop forwarding touch events to renderer. When
+ // scroll ends, we flush the queue and send touch end to renderer to release
+ // all existing touches. And we don't want to process the touch end in view,
+ // so we also clear the queue to not process the ack to the touch end.
sadrul 2013/08/06 19:34:19 I think with this patchset, the sequence of events
+ void OnGestureScrollEnd();
+
+ void ClearQueue();
+
// Empties the queue of touch events. This may result in any number of gesture
// events being sent to the renderer.
void FlushQueue();
@@ -78,6 +86,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