Chromium Code Reviews| Index: ui/events/gesture_detection/gesture_provider.cc |
| diff --git a/ui/events/gesture_detection/gesture_provider.cc b/ui/events/gesture_detection/gesture_provider.cc |
| index 0d3a55f6b5aa229c0161bc0163cbc712f3e40668..f97f5e0b3308f12e33390be1a3a8793cbc965236 100644 |
| --- a/ui/events/gesture_detection/gesture_provider.cc |
| +++ b/ui/events/gesture_detection/gesture_provider.cc |
| @@ -121,8 +121,9 @@ class GestureProvider::GestureListenerImpl : public ScaleGestureListener, |
| action == MotionEvent::ACTION_CANCEL) { |
| // Note: This call will have no effect if a fling was just generated, as |
| // |Fling()| will have already signalled an end to touch-scrolling. |
| - if (scroll_event_sent_) |
| + if (scroll_event_sent_) { |
|
tdresser
2015/04/16 17:33:34
No reason to add braces here.
lanwei
2015/04/20 19:58:59
Done.
|
| Send(CreateGesture(ET_GESTURE_SCROLL_END, event)); |
| + } |
| current_down_time_ = base::TimeTicks(); |
| } else if (action == MotionEvent::ACTION_MOVE) { |
| if (!show_press_event_sent_ && !scroll_event_sent_) { |
| @@ -217,7 +218,7 @@ class GestureProvider::GestureListenerImpl : public ScaleGestureListener, |
| return false; |
| if (!pinch_event_sent_) { |
| Send(CreateGesture(ET_GESTURE_PINCH_BEGIN, |
| - e.GetId(), |
| + e.GetPointerId(), |
| e.GetToolType(), |
| detector.GetEventTime(), |
| detector.GetFocusX(), |
| @@ -253,7 +254,7 @@ class GestureProvider::GestureListenerImpl : public ScaleGestureListener, |
| GestureEventDetails pinch_details(ET_GESTURE_PINCH_UPDATE); |
| pinch_details.set_scale(scale); |
| Send(CreateGesture(pinch_details, |
| - e.GetId(), |
| + e.GetPointerId(), |
| e.GetToolType(), |
| detector.GetEventTime(), |
| detector.GetFocusX(), |
| @@ -304,7 +305,7 @@ class GestureProvider::GestureListenerImpl : public ScaleGestureListener, |
| // Use the co-ordinates from the touch down, as these co-ordinates are |
| // used to determine which layer the scroll should affect. |
| Send(CreateGesture(scroll_details, |
| - e2.GetId(), |
| + e2.GetPointerId(), |
| e2.GetToolType(), |
| e2.GetEventTime(), |
| e1.GetX(), |
| @@ -333,7 +334,7 @@ class GestureProvider::GestureListenerImpl : public ScaleGestureListener, |
| const gfx::PointF raw_center = |
| center + gfx::Vector2dF(e2.GetRawOffsetX(), e2.GetRawOffsetY()); |
| Send(CreateGesture(scroll_details, |
| - e2.GetId(), |
| + e2.GetPointerId(), |
| e2.GetToolType(), |
| e2.GetEventTime(), |
| center.x(), |
| @@ -393,7 +394,7 @@ class GestureProvider::GestureListenerImpl : public ScaleGestureListener, |
| GestureEventDetails two_finger_tap_details( |
| ET_GESTURE_TWO_FINGER_TAP, e1.GetTouchMajor(), e1.GetTouchMajor()); |
| Send(CreateGesture(two_finger_tap_details, |
| - e2.GetId(), |
| + e2.GetPointerId(), |
| e2.GetToolType(), |
| e2.GetEventTime(), |
| e1.GetX(), |
| @@ -541,7 +542,7 @@ class GestureProvider::GestureListenerImpl : public ScaleGestureListener, |
| GestureEventData CreateGesture(const GestureEventDetails& details, |
| const MotionEvent& event) { |
| return GestureEventData(details, |
| - event.GetId(), |
| + event.GetPointerId(), |
| event.GetToolType(), |
| event.GetEventTime(), |
| event.GetX(), |
| @@ -772,7 +773,7 @@ void GestureProvider::OnTouchEventHandlingBegin(const MotionEvent& event) { |
| const int action_index = event.GetActionIndex(); |
| gesture_listener_->Send(gesture_listener_->CreateGesture( |
| ET_GESTURE_BEGIN, |
| - event.GetId(), |
| + event.GetPointerId(), |
| event.GetToolType(), |
| event.GetEventTime(), |
| event.GetX(action_index), |