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 f2d6f32e8c3da3b5331dab55be7f854e51f7f856..2d2a775308c5e15222289ad4fa40d14dfae97bdf 100644 |
--- a/ui/events/gesture_detection/gesture_provider.cc |
+++ b/ui/events/gesture_detection/gesture_provider.cc |
@@ -258,7 +258,7 @@ class GestureProvider::GestureListenerImpl |
SetIgnoreSingleTap(true); |
if (e.GetAction() == MotionEvent::ACTION_DOWN) |
- gesture_detector_.set_is_longpress_enabled(true); |
+ gesture_detector_.set_longpress_enabled(true); |
return gesture_detector_.OnTouchEvent(e); |
} |
@@ -349,6 +349,17 @@ class GestureProvider::GestureListenerImpl |
return true; |
} |
+ virtual bool OnSwipe(const MotionEvent& e1, |
+ const MotionEvent& e2, |
+ float velocity_x, |
+ float velocity_y) OVERRIDE { |
+ GestureEventDetails swipe_details( |
+ ET_GESTURE_MULTIFINGER_SWIPE, velocity_x, velocity_y); |
+ provider_->Send( |
+ CreateGesture(ET_GESTURE_MULTIFINGER_SWIPE, e2, swipe_details)); |
+ return true; |
+ } |
+ |
virtual void OnShowPress(const MotionEvent& e) OVERRIDE { |
GestureEventDetails show_press_details(ET_GESTURE_SHOW_PRESS, 0, 0); |
// TODO(jdduke): Expose minor axis length and rotation in |MotionEvent|. |
@@ -406,7 +417,7 @@ class GestureProvider::GestureListenerImpl |
virtual bool OnDoubleTapEvent(const MotionEvent& e) OVERRIDE { |
switch (e.GetAction()) { |
case MotionEvent::ACTION_DOWN: |
- gesture_detector_.set_is_longpress_enabled(false); |
+ gesture_detector_.set_longpress_enabled(false); |
break; |
case MotionEvent::ACTION_UP: |