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

Unified Diff: ui/events/gestures/gesture_provider_aura.cc

Issue 680413006: Re-enable Eager Gesture Recognition on Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address sadrul's comments. Created 6 years 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
« no previous file with comments | « ui/events/gestures/gesture_provider_aura.h ('k') | ui/events/gestures/gesture_recognizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/gesture_provider_aura.cc
diff --git a/ui/events/gestures/gesture_provider_aura.cc b/ui/events/gestures/gesture_provider_aura.cc
index 10f7ab10bb39901b73277f5679b6487340d6964b..ad6609279d94ac295b00dfc55558c6487a16fa3d 100644
--- a/ui/events/gestures/gesture_provider_aura.cc
+++ b/ui/events/gestures/gesture_provider_aura.cc
@@ -16,13 +16,16 @@ namespace ui {
GestureProviderAura::GestureProviderAura(GestureProviderAuraClient* client)
: client_(client),
filtered_gesture_provider_(DefaultGestureProviderConfig(), this),
- handling_event_(false) {
+ handling_event_(false),
+ last_unique_touch_event_id_(
+ std::numeric_limits<unsigned long long>::max()) {
filtered_gesture_provider_.SetDoubleTapSupportForPlatformEnabled(false);
}
GestureProviderAura::~GestureProviderAura() {}
bool GestureProviderAura::OnTouchEvent(const TouchEvent& event) {
+ last_unique_touch_event_id_ = event.unique_event_id();
int index = pointer_state_.FindPointerIndexOfId(event.touch_id());
bool pointer_id_is_active = index != -1;
@@ -52,11 +55,21 @@ bool GestureProviderAura::OnTouchEvent(const TouchEvent& event) {
return result;
}
-void GestureProviderAura::OnTouchEventAck(bool event_consumed) {
+void GestureProviderAura::OnAsyncTouchEventAck(bool event_consumed) {
DCHECK(pending_gestures_.empty());
DCHECK(!handling_event_);
base::AutoReset<bool> handling_event(&handling_event_, true);
- filtered_gesture_provider_.OnTouchEventAck(event_consumed);
+ filtered_gesture_provider_.OnAsyncTouchEventAck(event_consumed);
+ last_touch_event_latency_info_.Clear();
+}
+
+void GestureProviderAura::OnSyncTouchEventAck(const uint64 unique_event_id,
+ bool event_consumed) {
+ DCHECK_EQ(last_unique_touch_event_id_, unique_event_id);
+ DCHECK(pending_gestures_.empty());
+ DCHECK(!handling_event_);
+ base::AutoReset<bool> handling_event(&handling_event_, true);
+ filtered_gesture_provider_.OnSyncTouchEventAck(event_consumed);
last_touch_event_latency_info_.Clear();
}
« no previous file with comments | « ui/events/gestures/gesture_provider_aura.h ('k') | ui/events/gestures/gesture_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698