| Index: ui/events/event.cc
|
| diff --git a/ui/events/event.cc b/ui/events/event.cc
|
| index 894d5b0f2aded44d4880e4ce2d25b043c4d4477e..4a80e4bac15781ccfa98735a58829717e178b5ff 100644
|
| --- a/ui/events/event.cc
|
| +++ b/ui/events/event.cc
|
| @@ -168,6 +168,10 @@ bool Event::HasNativeEvent() const {
|
| return !!std::memcmp(&native_event_, &null_event, sizeof(null_event));
|
| }
|
|
|
| +void Event::DisableSynchronousHandling() {
|
| + result_ = static_cast<EventResult>(result_ | ER_DISABLE_SYNC_HANDLING);
|
| +}
|
| +
|
| void Event::StopPropagation() {
|
| // TODO(sad): Re-enable these checks once View uses dispatcher to dispatch
|
| // events.
|
| @@ -512,6 +516,7 @@ void MouseWheelEvent::UpdateForRootTransform(
|
| TouchEvent::TouchEvent(const base::NativeEvent& native_event)
|
| : LocatedEvent(native_event),
|
| touch_id_(GetTouchId(native_event)),
|
| + touch_event_id_(get_next_touch_event_id()),
|
| radius_x_(GetTouchRadiusX(native_event)),
|
| radius_y_(GetTouchRadiusY(native_event)),
|
| rotation_angle_(GetTouchAngle(native_event)),
|
| @@ -535,6 +540,7 @@ TouchEvent::TouchEvent(EventType type,
|
| base::TimeDelta time_stamp)
|
| : LocatedEvent(type, location, location, time_stamp, 0),
|
| touch_id_(touch_id),
|
| + touch_event_id_(get_next_touch_event_id()),
|
| radius_x_(0.0f),
|
| radius_y_(0.0f),
|
| rotation_angle_(0.0f),
|
| @@ -553,6 +559,7 @@ TouchEvent::TouchEvent(EventType type,
|
| float force)
|
| : LocatedEvent(type, location, location, time_stamp, flags),
|
| touch_id_(touch_id),
|
| + touch_event_id_(get_next_touch_event_id()),
|
| radius_x_(radius_x),
|
| radius_y_(radius_y),
|
| rotation_angle_(angle),
|
| @@ -580,6 +587,13 @@ void TouchEvent::UpdateForRootTransform(
|
| radius_y_ *= decomp.scale[1];
|
| }
|
|
|
| +int TouchEvent::get_next_touch_event_id() {
|
| + static int id = 0;
|
| + // We shouldn't have many touch events in existence at a
|
| + // time. 100000 should give us plenty of headroom.
|
| + return id++ % 100000;
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // KeyEvent
|
|
|
|
|