| 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_UI_MOTION_EVENT_GENERIC_H_ | 5 #ifndef UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_ |
| 6 #define UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_ | 6 #define UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include "base/containers/stack_container.h" | 11 #include "base/containers/stack_container.h" |
| 12 #include "base/memory/scoped_vector.h" | |
| 13 #include "ui/events/gesture_detection/gesture_detection_export.h" | 12 #include "ui/events/gesture_detection/gesture_detection_export.h" |
| 14 #include "ui/events/gesture_detection/motion_event.h" | 13 #include "ui/events/gesture_detection/motion_event.h" |
| 15 | 14 |
| 16 namespace ui { | 15 namespace ui { |
| 17 | 16 |
| 18 struct GESTURE_DETECTION_EXPORT PointerProperties { | 17 struct GESTURE_DETECTION_EXPORT PointerProperties { |
| 19 PointerProperties(); | 18 PointerProperties(); |
| 20 PointerProperties(float x, float y, float touch_major); | 19 PointerProperties(float x, float y, float touch_major); |
| 21 PointerProperties(const MotionEvent& event, size_t pointer_index); | 20 PointerProperties(const MotionEvent& event, size_t pointer_index); |
| 22 PointerProperties(const PointerProperties& other); | 21 PointerProperties(const PointerProperties& other); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 private: | 119 private: |
| 121 enum { kTypicalMaxPointerCount = 5 }; | 120 enum { kTypicalMaxPointerCount = 5 }; |
| 122 | 121 |
| 123 Action action_; | 122 Action action_; |
| 124 base::TimeTicks event_time_; | 123 base::TimeTicks event_time_; |
| 125 uint32_t unique_event_id_; | 124 uint32_t unique_event_id_; |
| 126 int action_index_; | 125 int action_index_; |
| 127 int button_state_; | 126 int button_state_; |
| 128 int flags_; | 127 int flags_; |
| 129 base::StackVector<PointerProperties, kTypicalMaxPointerCount> pointers_; | 128 base::StackVector<PointerProperties, kTypicalMaxPointerCount> pointers_; |
| 130 ScopedVector<MotionEvent> historical_events_; | 129 std::vector<std::unique_ptr<MotionEvent>> historical_events_; |
| 131 }; | 130 }; |
| 132 | 131 |
| 133 } // namespace ui | 132 } // namespace ui |
| 134 | 133 |
| 135 #endif // UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_ | 134 #endif // UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_ |
| OLD | NEW |