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

Unified Diff: ui/base/gestures/gesture_types.cc

Issue 10837329: gesture: Include velocity in scroll-update gestures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« ui/base/gestures/gesture_types.h ('K') | « ui/base/gestures/gesture_types.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/gestures/gesture_types.cc
diff --git a/ui/base/gestures/gesture_types.cc b/ui/base/gestures/gesture_types.cc
index 55dc7a17bbafe89efff7460b39dce857674661ac..7c0c25a51b0afc129f6bdbabe7845cc1ece507b2 100644
--- a/ui/base/gestures/gesture_types.cc
+++ b/ui/base/gestures/gesture_types.cc
@@ -45,8 +45,6 @@ GestureEventDetails::GestureEventDetails(ui::EventType type,
break;
default:
- data.generic.delta_x = delta_x;
- data.generic.delta_y = delta_y;
if (delta_x != 0.f || delta_y != 0.f) {
DLOG(WARNING) << "A gesture event (" << type << ") had unknown data: ("
<< delta_x << "," << delta_y;
@@ -55,4 +53,11 @@ GestureEventDetails::GestureEventDetails(ui::EventType type,
}
}
+void GestureEventDetails::SetScrollVelocity(float velocity_x,
+ float velocity_y) {
+ CHECK_EQ(ui::ET_GESTURE_SCROLL_UPDATE, type_);
+ data.scroll.velocity_x = velocity_x;
+ data.scroll.velocity_y = velocity_y;
+}
+
} // namespace ui
« ui/base/gestures/gesture_types.h ('K') | « ui/base/gestures/gesture_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698