Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: ui/events/event.cc

Issue 755403006: Added experimental Touch.tilt, Touch.tiltDirection support for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused code (event_sender.cc) Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/event.h ('k') | ui/events/event_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.cc
diff --git a/ui/events/event.cc b/ui/events/event.cc
index 5e7d8c86377a4d6a7c5546dcde02b6a76e6c71d4..3e812986149edcd3f259c08b94314ce161836489 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -532,6 +532,8 @@ TouchEvent::TouchEvent(const base::NativeEvent& native_event)
radius_y_(GetTouchRadiusY(native_event)),
rotation_angle_(GetTouchAngle(native_event)),
force_(GetTouchForce(native_event)),
+ tilt_(GetTouchTilt(native_event)),
+ tiltDirection_(GetTouchTiltDirection(native_event)),
may_cause_scrolling_(false),
should_remove_native_touch_id_mapping_(false) {
latency()->AddLatencyNumberWithTimestamp(
@@ -555,6 +557,8 @@ TouchEvent::TouchEvent(EventType type,
radius_y_(0.0f),
rotation_angle_(0.0f),
force_(0.0f),
+ tilt_(std::numeric_limits<float>::quiet_NaN()),
+ tiltDirection_(std::numeric_limits<float>::quiet_NaN()),
may_cause_scrolling_(false),
should_remove_native_touch_id_mapping_(false) {
latency()->AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0);
@@ -568,7 +572,9 @@ TouchEvent::TouchEvent(EventType type,
float radius_x,
float radius_y,
float angle,
- float force)
+ float force,
+ float tilt,
+ float tiltDirection)
: LocatedEvent(type, location, location, time_stamp, flags),
touch_id_(touch_id),
unique_event_id_(get_next_touch_event_id()),
@@ -576,6 +582,8 @@ TouchEvent::TouchEvent(EventType type,
radius_y_(radius_y),
rotation_angle_(angle),
force_(force),
+ tilt_(tilt),
+ tiltDirection_(tiltDirection),
may_cause_scrolling_(false),
should_remove_native_touch_id_mapping_(false) {
latency()->AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0);
« no previous file with comments | « ui/events/event.h ('k') | ui/events/event_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698