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

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

Issue 510793003: Remove ui::TouchEvent -> blink::WebTouchEvent conversion methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. 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
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 ad6609279d94ac295b00dfc55558c6487a16fa3d..26b8f57539079ccb0b92d38cb0255bfa6d4164b5 100644
--- a/ui/events/gestures/gesture_provider_aura.cc
+++ b/ui/events/gestures/gesture_provider_aura.cc
@@ -26,29 +26,9 @@ 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;
-
- if (event.type() == ET_TOUCH_PRESSED && pointer_id_is_active) {
- // Ignore touch press events if we already believe the pointer is down.
- return false;
- } else if (event.type() != ET_TOUCH_PRESSED && !pointer_id_is_active) {
- // We could have an active touch stream transfered to us, resulting in touch
- // move or touch up events without associated touch down events. Ignore
- // them.
- return false;
- }
-
- // If this is a touchmove event, and it isn't different from the last
- // event, ignore it.
- if (event.type() == ET_TOUCH_MOVED &&
- event.x() == pointer_state_.GetX(index) &&
- event.y() == pointer_state_.GetY(index)) {
- return false;
- }
-
last_touch_event_latency_info_ = *event.latency();
- pointer_state_.OnTouch(event);
+ if (!pointer_state_.OnTouch(event))
+ return false;
bool result = filtered_gesture_provider_.OnTouchEvent(pointer_state_);
pointer_state_.CleanupRemovedTouchPoints(event);

Powered by Google App Engine
This is Rietveld 408576698