Chromium Code Reviews| Index: ui/events/event.h |
| diff --git a/ui/events/event.h b/ui/events/event.h |
| index 427a731c0a203a44500cdbf1eadb34c60be0feb3..2166a4b69987c97d8413ae021186324e63325a7e 100644 |
| --- a/ui/events/event.h |
| +++ b/ui/events/event.h |
| @@ -204,6 +204,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(); |
|
sadrul
2014/12/07 17:25:44
Can you move DisableSynchronousHandling() inside T
tdresser
2014/12/08 14:49:30
Done.
|
| + 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. |
| @@ -489,11 +495,11 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
| TouchEvent(const TouchEvent& model, T* source, T* target) |
| : LocatedEvent(model, source, target), |
| touch_id_(model.touch_id_), |
| + unique_event_id_(model.unique_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,7 +518,10 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
| ~TouchEvent() override; |
| + // The id of the pointer this event modifies. |
| int touch_id() const { return touch_id_; } |
| + // A unique identifier for this event. |
| + uint64 unique_event_id() const { return unique_event_id_; } |
| float radius_x() const { return radius_x_; } |
| float radius_y() const { return radius_y_; } |
| float rotation_angle() const { return rotation_angle_; } |
| @@ -543,6 +552,10 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
| // 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 uint64 unique_event_id_; |
|
sadrul
2014/12/07 17:25:44
Remove the second sentence.
tdresser
2014/12/08 14:49:30
Good call. Done.
|
| + |
| // Radius of the X (major) axis of the touch ellipse. 0.0 if unknown. |
| float radius_x_; |