Index: content/browser/renderer_host/input/gesture_event_queue.h |
diff --git a/content/browser/renderer_host/input/gesture_event_queue.h b/content/browser/renderer_host/input/gesture_event_queue.h |
index 8855453494f884714463a96b278c789eafd25cce..c61ce28e06c1bfea09d527df2c6a5be87a8f766f 100644 |
--- a/content/browser/renderer_host/input/gesture_event_queue.h |
+++ b/content/browser/renderer_host/input/gesture_event_queue.h |
@@ -63,14 +63,20 @@ class CONTENT_EXPORT GestureEventQueue { |
PENDING, // The sequence has yet to receive an ack. |
ALLOWED_UNTIL_PREVENTED, // Gestures in the sequence are allowed until |
// a source touch is preventDefault'ed. |
- ALWAYS_ALLOWED, // All remaining sequence gestures are forwarded. |
- ALWAYS_PREVENTED // All remaining sequence gestures are dropped. |
+ ALWAYS_ALLOWED, // All remaining sequence gestures are forwarded |
+ // except for independent packets whose |
+ // corresponding touch was consumed. |
+ ALWAYS_PREVENTED // All remaining sequence gestures are dropped, |
+ // except for 'ending' gestures which are |
+ // needed to complete a previous sequence. |
}; |
GestureHandlingState state_; |
}; |
void UpdateAndDispatchPackets(GestureSequence* sequence, |
InputEventAckState ack_result); |
- void SendPacket(const GestureEventPacket& packet); |
+ void FilterAndSendPacket(const GestureEventPacket& packet, |
+ bool gesturePrevented, |
+ InputEventAckState ack_state); |
void SendGesture(const blink::WebGestureEvent& gesture); |
void CancelTapIfNecessary(); |
void CancelFlingIfNecessary(); |
@@ -86,6 +92,11 @@ class CONTENT_EXPORT GestureEventQueue { |
bool needs_tap_ending_event_; |
bool needs_fling_ending_event_; |
+ // Bookkeeping to ensure that scroll/pinch sequences are terminated |
+ // whenever they are started, regardless of the disposition. |
+ bool needs_scroll_ending_event_; |
+ bool needs_pinch_ending_event_; |
+ |
DISALLOW_COPY_AND_ASSIGN(GestureEventQueue); |
}; |