Index: ui/events/event.cc |
diff --git a/ui/events/event.cc b/ui/events/event.cc |
index 879f3e1e96647fb0447e0012c00bbef6195d0401..5d0589f1ef00b9c1488a68eef29718449b681d67 100644 |
--- a/ui/events/event.cc |
+++ b/ui/events/event.cc |
@@ -501,6 +501,44 @@ void LocatedEvent::UpdateForRootTransform( |
} |
//////////////////////////////////////////////////////////////////////////////// |
+// PointerDetails |
+ |
+PointerDetails::PointerDetails() {} |
+ |
+PointerDetails::PointerDetails(EventPointerType pointer_type) |
+ : pointer_type(pointer_type), |
+ force(std::numeric_limits<float>::quiet_NaN()) {} |
+ |
+PointerDetails::PointerDetails(EventPointerType pointer_type, |
+ float radius_x, |
+ float radius_y, |
+ float force, |
+ float tilt_x, |
+ float tilt_y, |
+ float tangential_pressure, |
+ int twist, |
+ uint32_t id) |
+ : pointer_type(pointer_type), |
+ // If we aren't provided with a radius on one axis, use the |
+ // information from the other axis. |
+ radius_x(radius_x > 0 ? radius_x : radius_y), |
+ radius_y(radius_y > 0 ? radius_y : radius_x), |
+ force(force), |
+ tilt_x(tilt_x), |
+ tilt_y(tilt_y), |
+ tangential_pressure(tangential_pressure), |
+ twist(twist), |
+ id(id) {} |
+ |
+PointerDetails::PointerDetails(EventPointerType pointer_type, |
+ const gfx::Vector2d& offset) |
+ : pointer_type(pointer_type), |
+ force(std::numeric_limits<float>::quiet_NaN()), |
+ offset(offset) {} |
+ |
+PointerDetails::PointerDetails(const PointerDetails& other) = default; |
+ |
+//////////////////////////////////////////////////////////////////////////////// |
// MouseEvent |
MouseEvent::MouseEvent(const base::NativeEvent& native_event) |