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

Unified Diff: ui/events/gesture_detection/gesture_event_data.cc

Issue 227743007: ui::GestureProvider gives GestureEventData the number of touch points. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address jdduke final nits. Created 6 years, 8 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
« no previous file with comments | « ui/events/gesture_detection/gesture_event_data.h ('k') | ui/events/gesture_detection/gesture_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gesture_detection/gesture_event_data.cc
diff --git a/ui/events/gesture_detection/gesture_event_data.cc b/ui/events/gesture_detection/gesture_event_data.cc
index 8750c248e0edfb2f6cb7d5a4671d9c035e3f15bf..0177d9655746e3a1f1ff51212b9721292dbb59fa 100644
--- a/ui/events/gesture_detection/gesture_event_data.cc
+++ b/ui/events/gesture_detection/gesture_event_data.cc
@@ -13,6 +13,7 @@ GestureEventData::GestureEventData(EventType type,
base::TimeTicks time,
float x,
float y,
+ int touch_point_count,
const GestureEventDetails& details)
: type(type),
motion_event_id(motion_event_id),
@@ -21,14 +22,17 @@ GestureEventData::GestureEventData(EventType type,
y(y),
details(details) {
DCHECK(motion_event_id >= 0);
+ DCHECK_NE(0, touch_point_count);
DCHECK(ET_GESTURE_TYPE_START <= type && type <= ET_GESTURE_TYPE_END);
+ this->details.set_touch_points(touch_point_count);
}
GestureEventData::GestureEventData(EventType type,
int motion_event_id,
base::TimeTicks time,
float x,
- float y)
+ float y,
+ int touch_point_count)
: type(type),
motion_event_id(motion_event_id),
time(time),
@@ -36,7 +40,9 @@ GestureEventData::GestureEventData(EventType type,
y(y),
details(GestureEventDetails(type, 0, 0)) {
DCHECK(motion_event_id >= 0);
+ DCHECK_NE(0, touch_point_count);
DCHECK(ET_GESTURE_TYPE_START <= type && type <= ET_GESTURE_TYPE_END);
+ details.set_touch_points(touch_point_count);
}
GestureEventData::GestureEventData() : type(ET_UNKNOWN), x(0), y(0) {}
« no previous file with comments | « ui/events/gesture_detection/gesture_event_data.h ('k') | ui/events/gesture_detection/gesture_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698