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

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

Issue 140253005: Add touch scrolling modes experimental flags (DEPRECATED) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address my own nits. Created 6 years, 11 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/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);
};

Powered by Google App Engine
This is Rietveld 408576698