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

Unified Diff: content/browser/renderer_host/input/touch_action_filter.cc

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Rebase Created 3 years, 12 months 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: content/browser/renderer_host/input/touch_action_filter.cc
diff --git a/content/browser/renderer_host/input/touch_action_filter.cc b/content/browser/renderer_host/input/touch_action_filter.cc
index 8ca3b6bb1973ac3e33ec4c0a207f902fe9529937..8d7a59a75980070fa9564f4ec5121033466e6548 100644
--- a/content/browser/renderer_host/input/touch_action_filter.cc
+++ b/content/browser/renderer_host/input/touch_action_filter.cc
@@ -81,7 +81,7 @@ bool TouchActionFilter::FilterGestureEvent(WebGestureEvent* gesture_event) {
// zero-velocity fling, convert the now zero-velocity fling accordingly.
if (!gesture_event->data.flingStart.velocityX &&
!gesture_event->data.flingStart.velocityY) {
- gesture_event->type = WebInputEvent::GestureScrollEnd;
+ gesture_event->setType(WebInputEvent::GestureScrollEnd);
}
}
return FilterScrollEndingGesture();
@@ -107,7 +107,7 @@ bool TouchActionFilter::FilterGestureEvent(WebGestureEvent* gesture_event) {
case WebInputEvent::GestureDoubleTap:
DCHECK_EQ(1, gesture_event->data.tap.tapCount);
if (!allow_current_double_tap_event_)
- gesture_event->type = WebInputEvent::GestureTap;
+ gesture_event->setType(WebInputEvent::GestureTap);
allow_current_double_tap_event_ = true;
break;
@@ -117,7 +117,7 @@ bool TouchActionFilter::FilterGestureEvent(WebGestureEvent* gesture_event) {
allow_current_double_tap_event_ =
(allowed_touch_action_ & TOUCH_ACTION_DOUBLE_TAP_ZOOM) != 0;
if (!allow_current_double_tap_event_) {
- gesture_event->type = WebInputEvent::GestureTap;
+ gesture_event->setType(WebInputEvent::GestureTap);
drop_current_tap_ending_event_ = true;
}
break;

Powered by Google App Engine
This is Rietveld 408576698