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

Unified Diff: ui/events/gestures/motion_event_aura.cc

Issue 567783002: Add modifier flags to MotionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove MotionEvent modifiers Created 6 years, 3 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/gestures/motion_event_aura.h ('k') | ui/events/gestures/motion_event_aura_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/motion_event_aura.cc
diff --git a/ui/events/gestures/motion_event_aura.cc b/ui/events/gestures/motion_event_aura.cc
index a8b46b3ba456130a82a498b0d203103359529389..1b7b825e7f1fa60e47efeca5d630a247ed037604 100644
--- a/ui/events/gestures/motion_event_aura.cc
+++ b/ui/events/gestures/motion_event_aura.cc
@@ -23,11 +23,13 @@ MotionEventAura::MotionEventAura(
const base::TimeTicks& last_touch_time,
Action cached_action,
int cached_action_index,
+ int flags,
const PointData (&active_touches)[MotionEvent::MAX_TOUCH_POINT_COUNT])
: pointer_count_(pointer_count),
last_touch_time_(last_touch_time),
cached_action_(cached_action),
- cached_action_index_(cached_action_index) {
+ cached_action_index_(cached_action_index),
+ flags_(flags) {
DCHECK(pointer_count_);
for (size_t i = 0; i < pointer_count; ++i)
active_touches_[i] = active_touches[i];
@@ -97,6 +99,7 @@ void MotionEventAura::OnTouch(const TouchEvent& touch) {
}
UpdateCachedAction(touch);
+ flags_ = touch.flags();
last_touch_time_ = touch.time_stamp() + base::TimeTicks();
}
@@ -174,6 +177,10 @@ int MotionEventAura::GetButtonState() const {
return 0;
}
+int MotionEventAura::GetFlags() const {
+ return flags_;
+}
+
base::TimeTicks MotionEventAura::GetEventTime() const {
return last_touch_time_;
}
@@ -183,11 +190,12 @@ scoped_ptr<MotionEvent> MotionEventAura::Clone() const {
last_touch_time_,
cached_action_,
cached_action_index_,
+ flags_,
active_touches_));
}
scoped_ptr<MotionEvent> MotionEventAura::Cancel() const {
return scoped_ptr<MotionEvent>(new MotionEventAura(
- pointer_count_, last_touch_time_, ACTION_CANCEL, -1, active_touches_));
+ pointer_count_, last_touch_time_, ACTION_CANCEL, -1, 0, active_touches_));
}
void MotionEventAura::CleanupRemovedTouchPoints(const TouchEvent& event) {
« no previous file with comments | « ui/events/gestures/motion_event_aura.h ('k') | ui/events/gestures/motion_event_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698