| Index: ui/base/gestures/gesture_sequence.cc
|
| diff --git a/ui/base/gestures/gesture_sequence.cc b/ui/base/gestures/gesture_sequence.cc
|
| index 2c3b599e78f8e7771aaaed6ac9084b66a27e6732..2707a3d617c91aada6efb94a1402679e088f3e9d 100644
|
| --- a/ui/base/gestures/gesture_sequence.cc
|
| +++ b/ui/base/gestures/gesture_sequence.cc
|
| @@ -30,7 +30,7 @@ enum TouchState {
|
| TS_UNKNOWN,
|
| };
|
|
|
| -// ui::TouchStatus is mapped to TouchStatusInternal to simply indicate whether a
|
| +// ui::EventResult is mapped to TouchStatusInternal to simply indicate whether a
|
| // processed touch-event should affect gesture-recognition or not.
|
| enum TouchStatusInternal {
|
| TSI_NOT_PROCESSED, // The touch-event should take-part into
|
| @@ -304,11 +304,10 @@ GestureSequence::~GestureSequence() {
|
|
|
| GestureSequence::Gestures* GestureSequence::ProcessTouchEventForGesture(
|
| const TouchEvent& event,
|
| - ui::TouchStatus status) {
|
| + EventResult result) {
|
| StopLongPressTimerIfRequired(event);
|
| last_touch_location_ = event.location();
|
| - if (status == ui::TOUCH_STATUS_QUEUED ||
|
| - status == ui::TOUCH_STATUS_QUEUED_END)
|
| + if (result & ER_ASYNC)
|
| return NULL;
|
|
|
| // Set a limit on the number of simultaneous touches in a gesture.
|
| @@ -348,7 +347,8 @@ GestureSequence::Gestures* GestureSequence::ProcessTouchEventForGesture(
|
| if (event.type() == ui::ET_TOUCH_PRESSED)
|
| AppendBeginGestureEvent(point, gestures.get());
|
|
|
| - TouchStatusInternal status_internal = (status == ui::TOUCH_STATUS_UNKNOWN) ?
|
| + CHECK_NE(ER_ASYNC, result);
|
| + TouchStatusInternal status_internal = (result == ER_UNHANDLED) ?
|
| TSI_NOT_PROCESSED : TSI_PROCESSED;
|
|
|
| EdgeStateSignatureType signature = Signature(state_, point_id,
|
| @@ -571,7 +571,7 @@ bool GestureSequence::IsSecondTouchDownCloseEnoughForTwoFingerTap() {
|
| gfx::Point p1 = GetPointByPointId(0)->last_touch_position();
|
| gfx::Point p2 = GetPointByPointId(1)->last_touch_position();
|
| double max_distance =
|
| - ui::GestureConfiguration::max_distance_for_two_finger_tap_in_pixels();
|
| + GestureConfiguration::max_distance_for_two_finger_tap_in_pixels();
|
| double distance = (p1.x() - p2.x()) * (p1.x() - p2.x()) +
|
| (p1.y() - p2.y()) * (p1.y() - p2.y());
|
| if (distance < max_distance * max_distance)
|
|
|