OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ |
6 #define UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 KeyEventParams(const KeyEventParams& other); | 27 KeyEventParams(const KeyEventParams& other); |
28 ~KeyEventParams(); | 28 ~KeyEventParams(); |
29 | 29 |
30 int device_id; | 30 int device_id; |
31 unsigned int code; | 31 unsigned int code; |
32 bool down; | 32 bool down; |
33 base::TimeDelta timestamp; | 33 base::TimeDelta timestamp; |
34 }; | 34 }; |
35 | 35 |
36 struct EVENTS_OZONE_EVDEV_EXPORT MouseMoveEventParams { | 36 struct EVENTS_OZONE_EVDEV_EXPORT MouseMoveEventParams { |
37 MouseMoveEventParams(int device_id, const gfx::PointF& location); | 37 MouseMoveEventParams(int device_id, |
| 38 const gfx::PointF& location, |
| 39 base::TimeDelta timestamp); |
38 MouseMoveEventParams(const MouseMoveEventParams& other); | 40 MouseMoveEventParams(const MouseMoveEventParams& other); |
39 ~MouseMoveEventParams(); | 41 ~MouseMoveEventParams(); |
40 | 42 |
41 int device_id; | 43 int device_id; |
42 gfx::PointF location; | 44 gfx::PointF location; |
| 45 base::TimeDelta timestamp; |
43 }; | 46 }; |
44 | 47 |
45 struct EVENTS_OZONE_EVDEV_EXPORT MouseButtonEventParams { | 48 struct EVENTS_OZONE_EVDEV_EXPORT MouseButtonEventParams { |
46 MouseButtonEventParams(int device_id, | 49 MouseButtonEventParams(int device_id, |
47 const gfx::PointF& location, | 50 const gfx::PointF& location, |
48 unsigned int button, | 51 unsigned int button, |
49 bool down, | 52 bool down, |
50 bool allow_remap); | 53 bool allow_remap, |
| 54 base::TimeDelta timestamp); |
51 MouseButtonEventParams(const MouseButtonEventParams& other); | 55 MouseButtonEventParams(const MouseButtonEventParams& other); |
52 ~MouseButtonEventParams(); | 56 ~MouseButtonEventParams(); |
53 | 57 |
54 int device_id; | 58 int device_id; |
55 gfx::PointF location; | 59 gfx::PointF location; |
56 unsigned int button; | 60 unsigned int button; |
57 bool down; | 61 bool down; |
58 bool allow_remap; | 62 bool allow_remap; |
| 63 base::TimeDelta timestamp; |
59 }; | 64 }; |
60 | 65 |
61 struct EVENTS_OZONE_EVDEV_EXPORT MouseWheelEventParams { | 66 struct EVENTS_OZONE_EVDEV_EXPORT MouseWheelEventParams { |
62 MouseWheelEventParams(int device_id, | 67 MouseWheelEventParams(int device_id, |
63 const gfx::PointF& location, | 68 const gfx::PointF& location, |
64 const gfx::Vector2d& delta); | 69 const gfx::Vector2d& delta, |
| 70 base::TimeDelta timestamp); |
65 MouseWheelEventParams(const MouseWheelEventParams& other); | 71 MouseWheelEventParams(const MouseWheelEventParams& other); |
66 ~MouseWheelEventParams(); | 72 ~MouseWheelEventParams(); |
67 | 73 |
68 int device_id; | 74 int device_id; |
69 gfx::PointF location; | 75 gfx::PointF location; |
70 gfx::Vector2d delta; | 76 gfx::Vector2d delta; |
| 77 base::TimeDelta timestamp; |
71 }; | 78 }; |
72 | 79 |
73 struct EVENTS_OZONE_EVDEV_EXPORT ScrollEventParams { | 80 struct EVENTS_OZONE_EVDEV_EXPORT ScrollEventParams { |
74 ScrollEventParams(int device_id, | 81 ScrollEventParams(int device_id, |
75 EventType type, | 82 EventType type, |
76 const gfx::PointF location, | 83 const gfx::PointF location, |
77 const gfx::Vector2dF delta, | 84 const gfx::Vector2dF delta, |
78 const gfx::Vector2dF ordinal_delta, | 85 const gfx::Vector2dF ordinal_delta, |
79 int finger_count, | 86 int finger_count, |
80 const base::TimeDelta timestamp); | 87 const base::TimeDelta timestamp); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 const std::vector<TouchscreenDevice>& devices) = 0; | 139 const std::vector<TouchscreenDevice>& devices) = 0; |
133 virtual void DispatchMouseDevicesUpdated( | 140 virtual void DispatchMouseDevicesUpdated( |
134 const std::vector<InputDevice>& devices) = 0; | 141 const std::vector<InputDevice>& devices) = 0; |
135 virtual void DispatchTouchpadDevicesUpdated( | 142 virtual void DispatchTouchpadDevicesUpdated( |
136 const std::vector<InputDevice>& devices) = 0; | 143 const std::vector<InputDevice>& devices) = 0; |
137 }; | 144 }; |
138 | 145 |
139 } // namespace ui | 146 } // namespace ui |
140 | 147 |
141 #endif // UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ | 148 #endif // UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ |
OLD | NEW |