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_DATA_H_ | 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ |
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ | 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 GestureEventData(const GestureEventDetails&, | 21 GestureEventData(const GestureEventDetails&, |
22 int motion_event_id, | 22 int motion_event_id, |
23 MotionEvent::ToolType primary_tool_type, | 23 MotionEvent::ToolType primary_tool_type, |
24 base::TimeTicks time, | 24 base::TimeTicks time, |
25 float x, | 25 float x, |
26 float y, | 26 float y, |
27 float raw_x, | 27 float raw_x, |
28 float raw_y, | 28 float raw_y, |
29 size_t touch_point_count, | 29 size_t touch_point_count, |
30 const gfx::RectF& bounding_box, | 30 const gfx::RectF& bounding_box, |
31 int flags); | 31 int flags, |
| 32 uint32_t unique_touch_event_id); |
32 GestureEventData(EventType type, const GestureEventData&); | 33 GestureEventData(EventType type, const GestureEventData&); |
33 GestureEventData(const GestureEventData& other); | 34 GestureEventData(const GestureEventData& other); |
34 | 35 |
35 EventType type() const { return details.type(); } | 36 EventType type() const { return details.type(); } |
36 | 37 |
37 GestureEventDetails details; | 38 GestureEventDetails details; |
38 int motion_event_id; | 39 int motion_event_id; |
39 MotionEvent::ToolType primary_tool_type; | 40 MotionEvent::ToolType primary_tool_type; |
40 base::TimeTicks time; | 41 base::TimeTicks time; |
41 float x; | 42 float x; |
42 float y; | 43 float y; |
43 float raw_x; | 44 float raw_x; |
44 float raw_y; | 45 float raw_y; |
45 int flags; | 46 int flags; |
46 | 47 |
| 48 // The unique id of the touch event that released the gesture event. This |
| 49 // field gets a non-zero from the corresponding field in |
| 50 // GestureEventDataPacket at the moment the gesture is pushed into the packet. |
| 51 uint32_t unique_touch_event_id; |
| 52 |
47 private: | 53 private: |
48 friend class GestureEventDataPacket; | 54 friend class GestureEventDataPacket; |
49 | 55 |
50 // Initializes type to GESTURE_TYPE_INVALID. | 56 // Initializes type to GESTURE_TYPE_INVALID. |
51 GestureEventData(); | 57 GestureEventData(); |
52 }; | 58 }; |
53 | 59 |
54 } // namespace ui | 60 } // namespace ui |
55 | 61 |
56 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ | 62 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ |
OLD | NEW |