| Index: ui/base/gestures/gesture_types.h
|
| diff --git a/ui/base/gestures/gesture_types.h b/ui/base/gestures/gesture_types.h
|
| index 6dd39b6d937b8c65eb55c296fcf796a857b89177..56dad14df12890f0aa970cb0369c9c457f4f71ac 100644
|
| --- a/ui/base/gestures/gesture_types.h
|
| +++ b/ui/base/gestures/gesture_types.h
|
| @@ -8,6 +8,7 @@
|
| #include "base/logging.h"
|
| #include "base/time.h"
|
| #include "ui/base/events.h"
|
| +#include "ui/gfx/rect.h"
|
|
|
| namespace ui {
|
|
|
| @@ -20,6 +21,9 @@ struct UI_EXPORT GestureEventDetails {
|
| int touch_points() const { return touch_points_; }
|
| void set_touch_points(int touch_points) { touch_points_ = touch_points; }
|
|
|
| + const gfx::Rect& bounding_box() const { return bounding_box_; }
|
| + void set_bounding_box(const gfx::Rect& box) { bounding_box_ = box; }
|
| +
|
| float scroll_x() const {
|
| CHECK_EQ(ui::ET_GESTURE_SCROLL_UPDATE, type_);
|
| return data.scroll.x;
|
| @@ -38,15 +42,6 @@ struct UI_EXPORT GestureEventDetails {
|
| return data.velocity.y;
|
| }
|
|
|
| - float radius_x() const {
|
| - CHECK_EQ(ui::ET_GESTURE_TAP, type_);
|
| - return data.radius.x;
|
| - }
|
| - float radius_y() const {
|
| - CHECK_EQ(ui::ET_GESTURE_TAP, type_);
|
| - return data.radius.y;
|
| - }
|
| -
|
| int touch_id() const {
|
| CHECK_EQ(ui::ET_GESTURE_LONG_PRESS, type_);
|
| return data.touch_id;
|
| @@ -97,11 +92,6 @@ struct UI_EXPORT GestureEventDetails {
|
| float y;
|
| } velocity;
|
|
|
| - struct { // TAP radius.
|
| - float x;
|
| - float y;
|
| - } radius;
|
| -
|
| int touch_id; // LONG_PRESS touch-id.
|
|
|
| struct { // SWIPE direction.
|
| @@ -118,6 +108,10 @@ struct UI_EXPORT GestureEventDetails {
|
| } data;
|
|
|
| int touch_points_; // Number of active touch points in the gesture.
|
| +
|
| + // Bounding box is an axis-aligned rectangle that contains all the
|
| + // enclosing rectangles of the touch-points in the gesture.
|
| + gfx::Rect bounding_box_;
|
| };
|
|
|
| // An abstract type to represent touch-events. The gesture-recognizer uses this
|
|
|