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 48f87497df696166e695780dff100070e8134c01..8400a5a55a038b8eb335a5de4ed23f16400a9ef7 100644 |
--- a/ui/events/gesture_detection/gesture_event_data.cc |
+++ b/ui/events/gesture_detection/gesture_event_data.cc |
@@ -8,25 +8,22 @@ |
namespace ui { |
-GestureEventData::GestureEventData(EventType type, |
+GestureEventData::GestureEventData(const GestureEventDetails& details, |
int motion_event_id, |
base::TimeTicks time, |
float x, |
float y, |
int touch_point_count, |
- const gfx::RectF& bounding_box, |
- const GestureEventDetails& details) |
- : type(type), |
+ const gfx::RectF& bounding_box) |
+ : details(details), |
motion_event_id(motion_event_id), |
time(time), |
x(x), |
- y(y), |
- details(details) { |
+ y(y) { |
DCHECK_GE(motion_event_id, 0); |
DCHECK_NE(0, touch_point_count); |
- DCHECK_GE(type, ET_GESTURE_TYPE_START); |
- DCHECK_LE(type, ET_GESTURE_TYPE_END); |
- DCHECK_EQ(type, details.type()); |
+ DCHECK_GE(details.type(), ET_GESTURE_TYPE_START); |
+ DCHECK_LE(details.type(), ET_GESTURE_TYPE_END); |
tdresser
2014/06/09 13:36:37
We could move these DCHECKs to the GestureEventDet
jdduke (slow)
2014/06/09 15:40:57
Totally, done.
|
this->details.set_touch_points(touch_point_count); |
this->details.set_bounding_box(bounding_box); |
} |
@@ -38,12 +35,11 @@ GestureEventData::GestureEventData(EventType type, |
float y, |
int touch_point_count, |
const gfx::RectF& bounding_box) |
- : type(type), |
+ : details(GestureEventDetails(type, 0, 0)), |
motion_event_id(motion_event_id), |
time(time), |
x(x), |
- y(y), |
- details(GestureEventDetails(type, 0, 0)) { |
+ y(y) { |
DCHECK_GE(motion_event_id, 0); |
DCHECK_NE(0, touch_point_count); |
DCHECK_GE(type, ET_GESTURE_TYPE_START); |
@@ -52,6 +48,7 @@ GestureEventData::GestureEventData(EventType type, |
details.set_bounding_box(bounding_box); |
} |
-GestureEventData::GestureEventData() : type(ET_UNKNOWN), x(0), y(0) {} |
+GestureEventData::GestureEventData() : x(0), y(0) { |
+} |
} // namespace ui |