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

Unified Diff: ui/events/event.h

Issue 1989623002: Suppressed MEs for gestures from cancelled PEs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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
« no previous file with comments | « ui/events/blink/blink_event_util_unittest.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.h
diff --git a/ui/events/event.h b/ui/events/event.h
index b01c12d3e303aacd6bec1c75a5b9e911a0c8a028..a617760b3b4727c0903ed77feef9345ae9284aef 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -988,11 +988,14 @@ class EVENTS_EXPORT ScrollEvent : public MouseEvent {
class EVENTS_EXPORT GestureEvent : public LocatedEvent {
public:
+ // The constructor takes a default unique_touch_id of zero to support many
+ // (80+) existing tests that doesn't care about this id.
GestureEvent(float x,
float y,
int flags,
base::TimeTicks time_stamp,
- const GestureEventDetails& details);
+ const GestureEventDetails& details,
+ uint32_t unique_touch_event_id = 0);
// Create a new GestureEvent which is identical to the provided model.
// If source / target windows are provided, the model location will be
@@ -1007,8 +1010,19 @@ class EVENTS_EXPORT GestureEvent : public LocatedEvent {
const GestureEventDetails& details() const { return details_; }
+ uint32_t unique_touch_event_id() const {
+ return unique_touch_event_id_;
+ }
+
private:
GestureEventDetails details_;
+
+ // The unique id of the touch event that caused the gesture event to be
+ // dispatched. This field gets a non-zero value only for gestures that are
+ // released through TouchDispositionGestureFilter::SendGesture. The gesture
+ // events that aren't fired directly in response to processing a touch-event
+ // (e.g. timer fired ones), this id is zero. See crbug.com/618738.
+ uint32_t unique_touch_event_id_;
};
} // namespace ui
« no previous file with comments | « ui/events/blink/blink_event_util_unittest.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698