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 "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
10 #include "ui/events/gesture_detection/gesture_detection_export.h" | 10 #include "ui/events/gesture_detection/gesture_detection_export.h" |
11 #include "ui/events/gesture_event_details.h" | 11 #include "ui/events/gesture_event_details.h" |
12 | 12 |
13 namespace ui { | 13 namespace ui { |
14 | 14 |
15 class GestureEventDataPacket; | 15 class GestureEventDataPacket; |
16 | 16 |
17 struct GESTURE_DETECTION_EXPORT GestureEventData { | 17 struct GESTURE_DETECTION_EXPORT GestureEventData { |
18 GestureEventData(EventType type, | 18 GestureEventData(EventType type, |
19 int motion_event_id, | 19 int motion_event_id, |
20 base::TimeTicks time, | 20 base::TimeTicks time, |
21 float x, | 21 float x, |
22 float y, | 22 float y, |
| 23 int touch_point_count, |
23 const GestureEventDetails& details); | 24 const GestureEventDetails& details); |
24 | 25 |
25 GestureEventData(EventType type, | 26 GestureEventData(EventType type, |
26 int motion_event_id, | 27 int motion_event_id, |
27 base::TimeTicks time, | 28 base::TimeTicks time, |
28 float x, | 29 float x, |
29 float y); | 30 float y, |
| 31 int touch_point_count); |
30 | 32 |
31 EventType type; | 33 EventType type; |
32 int motion_event_id; | 34 int motion_event_id; |
33 base::TimeTicks time; | 35 base::TimeTicks time; |
34 float x; | 36 float x; |
35 float y; | 37 float y; |
36 | 38 |
37 GestureEventDetails details; | 39 GestureEventDetails details; |
38 | 40 |
39 private: | 41 private: |
40 friend class GestureEventDataPacket; | 42 friend class GestureEventDataPacket; |
41 | 43 |
42 // Initializes type to GESTURE_TYPE_INVALID. | 44 // Initializes type to GESTURE_TYPE_INVALID. |
43 GestureEventData(); | 45 GestureEventData(); |
44 }; | 46 }; |
45 | 47 |
46 } // namespace ui | 48 } // namespace ui |
47 | 49 |
48 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ | 50 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ |
OLD | NEW |