Index: ui/events/event.h |
diff --git a/ui/events/event.h b/ui/events/event.h |
index 56fd74c85d53d17d000fa1b9c6c0796104379056..1960557b9067cd043192cb782720d192a24483d9 100644 |
--- a/ui/events/event.h |
+++ b/ui/events/event.h |
@@ -203,6 +203,12 @@ class EVENTS_EXPORT Event { |
// Returns true if the event has a valid |native_event_|. |
bool HasNativeEvent() const; |
+ // Marks the event as not participating in synchronous gesture recognition. |
+ void DisableSynchronousHandling(); |
+ bool synchronous_handling_disabled() const { |
+ return !!(result_ & ER_DISABLE_SYNC_HANDLING); |
+ } |
+ |
// Immediately stops the propagation of the event. This must be called only |
// from an EventHandler during an event-dispatch. Any event handler that may |
// be in the list will not receive the event after this is called. |
@@ -488,11 +494,11 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
TouchEvent(const TouchEvent& model, T* source, T* target) |
: LocatedEvent(model, source, target), |
touch_id_(model.touch_id_), |
+ touch_event_id_(model.touch_event_id_), |
radius_x_(model.radius_x_), |
radius_y_(model.radius_y_), |
rotation_angle_(model.rotation_angle_), |
- force_(model.force_) { |
- } |
+ force_(model.force_) {} |
TouchEvent(EventType type, |
const gfx::PointF& location, |
@@ -512,6 +518,7 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
~TouchEvent() override; |
int touch_id() const { return touch_id_; } |
+ int touch_event_id() const { return touch_event_id_; } |
float radius_x() const { return radius_x_; } |
float radius_y() const { return radius_y_; } |
float rotation_angle() const { return rotation_angle_; } |
@@ -538,10 +545,16 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
void set_force(float force) { force_ = force; } |
private: |
+ int get_next_touch_event_id(); |
+ |
// The identity (typically finger) of the touch starting at 0 and incrementing |
// for each separable additional touch that the hardware can detect. |
const int touch_id_; |
+ // A unique identifier for the touch event. Currently only used for |
+ // checking equality of touch events for debugging purposes. |
+ const int touch_event_id_; |
+ |
// Radius of the X (major) axis of the touch ellipse. 0.0 if unknown. |
float radius_x_; |