| 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" |
| 11 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
| 12 #include "ui/gfx/rect_conversions.h" | 12 #include "ui/gfx/rect_conversions.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 struct EVENTS_BASE_EXPORT GestureEventDetails { | 16 struct EVENTS_BASE_EXPORT GestureEventDetails { |
| 17 public: | 17 public: |
| 18 GestureEventDetails(); | 18 GestureEventDetails(); |
| 19 GestureEventDetails(EventType type, float delta_x, float delta_y); | 19 GestureEventDetails(EventType type, float delta_x, float delta_y); |
| 20 GestureEventDetails(const GestureEventDetails& details); |
| 20 | 21 |
| 21 EventType type() const { return type_; } | 22 EventType type() const { return type_; } |
| 22 | 23 |
| 23 int touch_points() const { return touch_points_; } | 24 int touch_points() const { return touch_points_; } |
| 24 void set_touch_points(int touch_points) { | 25 void set_touch_points(int touch_points) { |
| 25 DCHECK_GT(touch_points, 0); | 26 DCHECK_GT(touch_points, 0); |
| 26 touch_points_ = touch_points; | 27 touch_points_ = touch_points; |
| 27 } | 28 } |
| 28 | 29 |
| 29 int oldest_touch_id() const { return oldest_touch_id_; } | 30 int oldest_touch_id() const { return oldest_touch_id_; } |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 // enclosing rectangles of the touch-points in the gesture. | 172 // enclosing rectangles of the touch-points in the gesture. |
| 172 gfx::RectF bounding_box_; | 173 gfx::RectF bounding_box_; |
| 173 | 174 |
| 174 // The touch id of the oldest touch contributing to the gesture. | 175 // The touch id of the oldest touch contributing to the gesture. |
| 175 int oldest_touch_id_; | 176 int oldest_touch_id_; |
| 176 }; | 177 }; |
| 177 | 178 |
| 178 } // namespace ui | 179 } // namespace ui |
| 179 | 180 |
| 180 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ | 181 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ |
| OLD | NEW |