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

Unified Diff: ui/events/gesture_event_details.cc

Issue 1049383003: Postpone rail application for touch scrolling - chrome side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: ui/events/gesture_event_details.cc
diff --git a/ui/events/gesture_event_details.cc b/ui/events/gesture_event_details.cc
index e14fb17302ab12fd89050b62cd4a6e25c3f5423d..1302cf83e7c10c71955c07c5726816d9f16bf294 100644
--- a/ui/events/gesture_event_details.cc
+++ b/ui/events/gesture_event_details.cc
@@ -18,24 +18,35 @@ GestureEventDetails::GestureEventDetails(ui::EventType type)
GestureEventDetails::GestureEventDetails(ui::EventType type,
float delta_x,
- float delta_y)
+ float delta_y,
+ ScrollRailState scroll_rail_state)
: type_(type), touch_points_(1), oldest_touch_id_(-1) {
- DCHECK_GE(type, ET_GESTURE_TYPE_START);
- DCHECK_LE(type, ET_GESTURE_TYPE_END);
switch (type_) {
- case ui::ET_GESTURE_SCROLL_BEGIN:
- data_.scroll_begin.x_hint = delta_x;
- data_.scroll_begin.y_hint = delta_y;
- break;
-
case ui::ET_GESTURE_SCROLL_UPDATE:
data_.scroll_update.x = delta_x;
data_.scroll_update.y = delta_y;
+ data_.scroll_update.scroll_rail_state = scroll_rail_state;
break;
case ui::ET_SCROLL_FLING_START:
- data_.fling_velocity.x = delta_x;
- data_.fling_velocity.y = delta_y;
+ data_.fling_start.x = delta_x;
+ data_.fling_start.y = delta_y;
+ data_.fling_start.scroll_rail_state = scroll_rail_state;
+ break;
+
+ default:
+ NOTREACHED() << "Invalid event type for constructor: " << type;
+ }
+}
+
+GestureEventDetails::GestureEventDetails(ui::EventType type,
+ float delta_x,
+ float delta_y)
+ : type_(type), touch_points_(1), oldest_touch_id_(-1) {
+ switch (type_) {
+ case ui::ET_GESTURE_SCROLL_BEGIN:
+ data_.scroll_begin.x_hint = delta_x;
+ data_.scroll_begin.y_hint = delta_y;
break;
case ui::ET_GESTURE_TWO_FINGER_TAP:
« ui/events/gesture_detection/gesture_provider.cc ('K') | « ui/events/gesture_event_details.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698