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 19 matching lines...) Expand all Loading... |
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 uint32_t unique_touch_event_id); |
33 GestureEventData(EventType type, const GestureEventData&); | 33 GestureEventData(EventType type, const GestureEventData&); |
34 GestureEventData(const GestureEventData& other); | 34 GestureEventData(const GestureEventData& other); |
35 | 35 |
36 EventType type() const { return details.type(); } | 36 EventType type() const { return details.type(); } |
37 | 37 |
38 GestureEventDetails details; | 38 GestureEventDetails details; |
39 int motion_event_id; | 39 int motion_event_id; |
| 40 // The tool type for the first touch point in the gesture. |
40 MotionEvent::ToolType primary_tool_type; | 41 MotionEvent::ToolType primary_tool_type; |
41 base::TimeTicks time; | 42 base::TimeTicks time; |
42 float x; | 43 float x; |
43 float y; | 44 float y; |
44 float raw_x; | 45 float raw_x; |
45 float raw_y; | 46 float raw_y; |
46 int flags; | 47 int flags; |
47 | 48 |
48 // The unique id of the touch event that released the gesture event. This | 49 // 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 // field gets a non-zero from the corresponding field in |
50 // GestureEventDataPacket at the moment the gesture is pushed into the packet. | 51 // GestureEventDataPacket at the moment the gesture is pushed into the packet. |
51 uint32_t unique_touch_event_id; | 52 uint32_t unique_touch_event_id; |
52 | 53 |
53 private: | 54 private: |
54 friend class GestureEventDataPacket; | 55 friend class GestureEventDataPacket; |
55 | 56 |
56 // Initializes type to GESTURE_TYPE_INVALID. | 57 // Initializes type to GESTURE_TYPE_INVALID. |
57 GestureEventData(); | 58 GestureEventData(); |
58 }; | 59 }; |
59 | 60 |
60 } // namespace ui | 61 } // namespace ui |
61 | 62 |
62 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ | 63 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ |
OLD | NEW |