Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ui / events / gesture_detection / gesture_event_data.cc
index 345b630..9cd92b3 100644 (file)
@@ -9,24 +9,44 @@
 namespace ui {
 
 GestureEventData::GestureEventData(EventType type,
+                                   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), time(time), x(x), y(y), details(details) {
+    : type(type),
+      motion_event_id(motion_event_id),
+      time(time),
+      x(x),
+      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);
+  this->details.set_bounding_box(bounding_box);
 }
 
 GestureEventData::GestureEventData(EventType type,
+                                   int motion_event_id,
                                    base::TimeTicks time,
                                    float x,
-                                   float y)
+                                   float y,
+                                   int touch_point_count,
+                                   const gfx::RectF& bounding_box)
     : type(type),
+      motion_event_id(motion_event_id),
       time(time),
       x(x),
       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);
+  details.set_bounding_box(bounding_box);
 }
 
 GestureEventData::GestureEventData() : type(ET_UNKNOWN), x(0), y(0) {}