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

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

Issue 660663002: Clear pending events upon main frame navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates 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..5f10b354f0d1e45f53d39669900c1c4b3491b12c 100644
--- a/ui/events/gesture_detection/gesture_provider.cc
+++ b/ui/events/gesture_detection/gesture_provider.cc
@@ -11,7 +11,7 @@
#include "ui/events/event_constants.h"
#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 +711,14 @@ bool GestureProvider::OnTouchEvent(const MotionEvent& event) {
return true;
}
+void GestureProvider::ResetDetection() {
+ ui::MotionEventGeneric synthetic_cancel(ui::MotionEvent::ACTION_CANCEL,
+ base::TimeTicks::Now(),
+ ui::PointerProperties());
+ OnTouchEvent(synthetic_cancel);
+ DCHECK(!current_down_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/touch_disposition_gesture_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698