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

Unified Diff: ui/events/gesture_detection/touch_disposition_gesture_filter.h

Issue 1287103004: Sync ui/events to chromium @ https://codereview.chromium.org/1210203002 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 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: ui/events/gesture_detection/touch_disposition_gesture_filter.h
diff --git a/ui/events/gesture_detection/touch_disposition_gesture_filter.h b/ui/events/gesture_detection/touch_disposition_gesture_filter.h
index 290afaaf6a8d3eed60e4226b51823c8833371f19..201dc0276980d1a57a78fe5d4786561875b87c94 100644
--- a/ui/events/gesture_detection/touch_disposition_gesture_filter.h
+++ b/ui/events/gesture_detection/touch_disposition_gesture_filter.h
@@ -42,8 +42,8 @@ class GESTURE_DETECTION_EXPORT TouchDispositionGestureFilter {
};
PacketResult OnGesturePacket(const GestureEventDataPacket& packet);
- // To be called upon receipt of *all* touch event acks.
- void OnTouchEventAck(bool event_consumed);
+ // OnTouchEventAck must be called upon receipt of every touch event ack.
+ void OnTouchEventAck(uint32 unique_event_id, bool event_consumed);
// Whether there are any active gesture sequences still queued in the filter.
bool IsEmpty() const;
@@ -66,14 +66,18 @@ class GESTURE_DETECTION_EXPORT TouchDispositionGestureFilter {
// Returns true iff the gesture should be dropped.
bool Filter(EventType type);
+ // Whether an event of |type| has been filtered from the current sequence.
+ bool HasFilteredGestureType(EventType type) const;
+
private:
// True iff the sequence has had any touch down event consumed.
bool start_touch_consumed_;
// True iff the most recently ack'ed touch event was consumed.
bool current_touch_consumed_;
- // If the previous gesture of a given type was dropped instead of being
- // dispatched, its type will occur in this set.
+ // Indicates whether the previous gesture of a given type was dropped.
BitSet32 last_gesture_of_type_dropped_;
+ // Indicates whether *any* previous gesture of a given type was dropped.
+ BitSet32 any_gesture_of_type_dropped_;
};
void FilterAndSendPacket(const GestureEventDataPacket& packet);
@@ -83,6 +87,7 @@ class GESTURE_DETECTION_EXPORT TouchDispositionGestureFilter {
void CancelFlingIfNecessary(const GestureEventDataPacket& packet);
void EndScrollIfNecessary(const GestureEventDataPacket& packet);
void PopGestureSequence();
+ void SendAckedEvents();
GestureSequence& Head();
GestureSequence& Tail();

Powered by Google App Engine
This is Rietveld 408576698