| 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(const GestureEventDetails&, | 18 GestureEventData(const GestureEventDetails&, |
| 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 float raw_x, |
| 24 float raw_y, |
| 23 int touch_point_count, | 25 int touch_point_count, |
| 24 const gfx::RectF& bounding_box); | 26 const gfx::RectF& bounding_box); |
| 25 | 27 GestureEventData(EventType type, const GestureEventData&); |
| 26 GestureEventData(EventType type, | |
| 27 int motion_event_id, | |
| 28 base::TimeTicks time, | |
| 29 float x, | |
| 30 float y, | |
| 31 int touch_point_count, | |
| 32 const gfx::RectF& bounding_box); | |
| 33 | 28 |
| 34 EventType type() const { return details.type(); } | 29 EventType type() const { return details.type(); } |
| 35 | 30 |
| 36 GestureEventDetails details; | 31 GestureEventDetails details; |
| 37 int motion_event_id; | 32 int motion_event_id; |
| 38 base::TimeTicks time; | 33 base::TimeTicks time; |
| 39 float x; | 34 float x; |
| 40 float y; | 35 float y; |
| 36 float raw_x; |
| 37 float raw_y; |
| 41 | 38 |
| 42 private: | 39 private: |
| 43 friend class GestureEventDataPacket; | 40 friend class GestureEventDataPacket; |
| 44 | 41 |
| 45 // Initializes type to GESTURE_TYPE_INVALID. | 42 // Initializes type to GESTURE_TYPE_INVALID. |
| 46 GestureEventData(); | 43 GestureEventData(); |
| 47 }; | 44 }; |
| 48 | 45 |
| 49 } // namespace ui | 46 } // namespace ui |
| 50 | 47 |
| 51 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ | 48 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ |
| OLD | NEW |