Index: ui/aura/gestures/gesture_point.h |
diff --git a/ui/aura/gestures/gesture_point.h b/ui/aura/gestures/gesture_point.h |
index a3a46dbc0473ba4c7bed1439d668382ca030cc37..e05ed7ee0abc27b6f0efa454ff3f71bb4b2a27d0 100644 |
--- a/ui/aura/gestures/gesture_point.h |
+++ b/ui/aura/gestures/gesture_point.h |
@@ -53,8 +53,16 @@ class GesturePoint { |
double last_touch_time() const { return last_touch_time_; } |
const gfx::Point& last_touch_position() const { return last_touch_position_; } |
- void set_touch_id(unsigned int touch_id) { touch_id_ = touch_id; } |
- const unsigned int touch_id() const { return touch_id_; } |
+ // point_id_ is used to drive GestureSequence::ProcessTouchEventForGesture. |
+ // point_ids are maintained such that the set of point_ids is always |
+ // contiguous, from 0 to the number of current touches. |
+ // A lower point_id indicates that a touch occurred first. |
+ // A negative point_id indicates that the GesturePoint is not currently |
+ // associated with a touch. |
+ void set_point_id(int point_id) { point_id_ = point_id; } |
+ const int point_id() const { return point_id_; } |
+ |
+ const bool in_use() const { return point_id_ >= 0; } |
double x_delta() const { |
return last_touch_position_.x() - first_touch_position_.x(); |
@@ -87,7 +95,8 @@ class GesturePoint { |
VelocityCalculator velocity_calculator_; |
- unsigned int touch_id_; |
+ bool in_use_; |
sadrul
2012/02/23 21:44:14
Remove
tdresser
2012/02/23 22:16:55
Done.
|
+ int point_id_; |
DISALLOW_COPY_AND_ASSIGN(GesturePoint); |
}; |