OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ | 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ |
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ | 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
10 #include "ui/events/events_base_export.h" | 10 #include "ui/events/events_base_export.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 DCHECK_GT(touch_points, 0); | 30 DCHECK_GT(touch_points, 0); |
31 touch_points_ = touch_points; | 31 touch_points_ = touch_points; |
32 } | 32 } |
33 | 33 |
34 int oldest_touch_id() const { return oldest_touch_id_; } | 34 int oldest_touch_id() const { return oldest_touch_id_; } |
35 void set_oldest_touch_id(int oldest_touch_id) { | 35 void set_oldest_touch_id(int oldest_touch_id) { |
36 DCHECK_GE(oldest_touch_id, 0); | 36 DCHECK_GE(oldest_touch_id, 0); |
37 oldest_touch_id_ = oldest_touch_id; | 37 oldest_touch_id_ = oldest_touch_id; |
38 } | 38 } |
39 | 39 |
40 // TODO(tdresser): Return RectF. See crbug.com/337824. | |
41 const gfx::Rect bounding_box() const { | 40 const gfx::Rect bounding_box() const { |
42 return ToEnclosingRect(bounding_box_); | 41 return ToEnclosingRect(bounding_box_); |
43 } | 42 } |
44 | 43 |
45 const gfx::RectF& bounding_box_f() const { | 44 const gfx::RectF& bounding_box_f() const { |
46 return bounding_box_; | 45 return bounding_box_; |
47 } | 46 } |
48 | 47 |
49 void set_bounding_box(const gfx::RectF& box) { bounding_box_ = box; } | 48 void set_bounding_box(const gfx::RectF& box) { bounding_box_ = box; } |
50 | 49 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 // enclosing rectangles of the touch-points in the gesture. | 194 // enclosing rectangles of the touch-points in the gesture. |
196 gfx::RectF bounding_box_; | 195 gfx::RectF bounding_box_; |
197 | 196 |
198 // The touch id of the oldest touch contributing to the gesture. | 197 // The touch id of the oldest touch contributing to the gesture. |
199 int oldest_touch_id_; | 198 int oldest_touch_id_; |
200 }; | 199 }; |
201 | 200 |
202 } // namespace ui | 201 } // namespace ui |
203 | 202 |
204 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ | 203 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ |
OLD | NEW |