Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: ui/events/gesture_detection/gesture_provider.cc

Issue 717573004: [Android] Thoroughly reset gesture detection upon page navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 3535ad604af64a545669830e250c32c9986043e1..6962d7093037ddaba0daddb0aa8e5ceef053e1ed 100644
--- a/ui/events/gesture_detection/gesture_provider.cc
+++ b/ui/events/gesture_detection/gesture_provider.cc
@@ -12,6 +12,7 @@
#include "ui/events/gesture_detection/gesture_event_data.h"
#include "ui/events/gesture_detection/gesture_listeners.h"
#include "ui/events/gesture_detection/motion_event.h"
+#include "ui/events/gesture_detection/motion_event_generic.h"
#include "ui/events/gesture_detection/scale_gesture_listeners.h"
#include "ui/gfx/geometry/point_f.h"
@@ -711,6 +712,13 @@ bool GestureProvider::OnTouchEvent(const MotionEvent& event) {
return true;
}
+void GestureProvider::ResetDetection() {
+ MotionEventGeneric generic_cancel_event(MotionEvent::ACTION_CANCEL,
+ base::TimeTicks::Now(),
+ PointerProperties());
+ OnTouchEvent(generic_cancel_event);
+}
+
void GestureProvider::SetMultiTouchZoomSupportEnabled(bool enabled) {
gesture_listener_->SetMultiTouchZoomEnabled(enabled);
}
« no previous file with comments | « ui/events/gesture_detection/gesture_provider.h ('k') | ui/events/gesture_detection/gesture_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698