Chromium Code Reviews| Index: ui/events/event.h |
| diff --git a/ui/events/event.h b/ui/events/event.h |
| index b8a341a22345e862966e383f4dbe250ca082e9d1..f774ae5ebcb639f6dab3a34594e5a776df918e3a 100644 |
| --- a/ui/events/event.h |
| +++ b/ui/events/event.h |
| @@ -436,7 +436,8 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
| radius_x_(model.radius_x_), |
| radius_y_(model.radius_y_), |
| rotation_angle_(model.rotation_angle_), |
| - force_(model.force_) { |
| + force_(model.force_), |
| + source_device_id_(model.source_device_id_) { |
| } |
| TouchEvent(EventType type, |
| @@ -461,6 +462,7 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
| float radius_y() const { return radius_y_; } |
| float rotation_angle() const { return rotation_angle_; } |
| float force() const { return force_; } |
| + int source_device_id() const { return source_device_id_; } |
| // Relocate the touch-point to a new |origin|. |
| // This is useful when touch event is in X Root Window coordinates, |
| @@ -470,6 +472,9 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
| // Used for unit tests. |
| void set_radius_x(const float r) { radius_x_ = r; } |
| void set_radius_y(const float r) { radius_y_ = r; } |
| + void set_source_device_id(int source_device_id) { |
| + source_device_id_ = source_device_id; |
| + } |
| // Overridden from LocatedEvent. |
| virtual void UpdateForRootTransform( |
| @@ -503,6 +508,9 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
| // Force (pressure) of the touch. Normalized to be [0, 1]. Default to be 0.0. |
| float force_; |
| + |
| + // The device id of the screen the event came from. |
|
sadrul
2014/01/08 20:50:52
Mention that this defaults to -1
tdresser
2014/01/09 19:07:35
Done.
|
| + int source_device_id_; |
| }; |
| class EVENTS_EXPORT KeyEvent : public Event { |