| Index: ui/base/gestures/gesture_types.h
|
| diff --git a/ui/base/gestures/gesture_types.h b/ui/base/gestures/gesture_types.h
|
| index 09c80b055b1f28a9eb07c5092804a76c2c473a9c..6dd39b6d937b8c65eb55c296fcf796a857b89177 100644
|
| --- a/ui/base/gestures/gesture_types.h
|
| +++ b/ui/base/gestures/gesture_types.h
|
| @@ -15,6 +15,11 @@ struct UI_EXPORT GestureEventDetails {
|
| public:
|
| GestureEventDetails(EventType type, float delta_x, float delta_y);
|
|
|
| + EventType type() const { return type_; }
|
| +
|
| + int touch_points() const { return touch_points_; }
|
| + void set_touch_points(int touch_points) { touch_points_ = touch_points; }
|
| +
|
| float scroll_x() const {
|
| CHECK_EQ(ui::ET_GESTURE_SCROLL_UPDATE, type_);
|
| return data.scroll.x;
|
| @@ -47,11 +52,6 @@ struct UI_EXPORT GestureEventDetails {
|
| return data.touch_id;
|
| }
|
|
|
| - int touch_points() const {
|
| - DCHECK(type_ == ui::ET_GESTURE_BEGIN || type_ == ui::ET_GESTURE_END);
|
| - return data.touch_points;
|
| - }
|
| -
|
| float scale() const {
|
| CHECK_EQ(ui::ET_GESTURE_PINCH_UPDATE, type_);
|
| return data.scale;
|
| @@ -104,8 +104,6 @@ struct UI_EXPORT GestureEventDetails {
|
|
|
| int touch_id; // LONG_PRESS touch-id.
|
|
|
| - int touch_points; // Number of active touch points for BEGIN/END.
|
| -
|
| struct { // SWIPE direction.
|
| bool left;
|
| bool right;
|
| @@ -118,6 +116,8 @@ struct UI_EXPORT GestureEventDetails {
|
| float delta_y;
|
| } generic;
|
| } data;
|
| +
|
| + int touch_points_; // Number of active touch points in the gesture.
|
| };
|
|
|
| // An abstract type to represent touch-events. The gesture-recognizer uses this
|
| @@ -187,12 +187,10 @@ class UI_EXPORT GestureEventHelper {
|
|
|
| // |flags| is ui::EventFlags. The meaning of |param_first| and |param_second|
|
| // depends on the specific gesture type (|type|).
|
| - virtual GestureEvent* CreateGestureEvent(EventType type,
|
| + virtual GestureEvent* CreateGestureEvent(const GestureEventDetails& details,
|
| const gfx::Point& location,
|
| int flags,
|
| base::Time time,
|
| - float param_first,
|
| - float param_second,
|
| unsigned int touch_id_bitfield) = 0;
|
|
|
| virtual TouchEvent* CreateTouchEvent(EventType type,
|
|
|