Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ui / events / gesture_event_details.h
index 58d28fa..da7a60b 100644 (file)
@@ -16,6 +16,7 @@ namespace ui {
 struct EVENTS_BASE_EXPORT GestureEventDetails {
  public:
   GestureEventDetails();
+  explicit GestureEventDetails(EventType type);
   GestureEventDetails(EventType type, float delta_x, float delta_y);
 
   EventType type() const { return type_; }
@@ -123,6 +124,12 @@ struct EVENTS_BASE_EXPORT GestureEventDetails {
     data.tap_count = tap_count;
   }
 
+  void set_scale(float scale) {
+    DCHECK_GE(scale, 0.0f);
+    DCHECK_EQ(type_, ET_GESTURE_PINCH_UPDATE);
+    data.scale = scale;
+  }
+
  private:
   EventType type_;
   union Details {