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

Unified Diff: ui/events/gesture_detection/motion_event_generic.cc

Issue 999423003: Set the unique_event_id when converting from TouchEvent to WebTouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
Index: ui/events/gesture_detection/motion_event_generic.cc
diff --git a/ui/events/gesture_detection/motion_event_generic.cc b/ui/events/gesture_detection/motion_event_generic.cc
index 475e9c5bc808eb3d40f042fd5a8aff751a4858c5..36b477bd5092d95e4ee08af0dc564ceae563ab6f 100644
--- a/ui/events/gesture_detection/motion_event_generic.cc
+++ b/ui/events/gesture_detection/motion_event_generic.cc
@@ -46,7 +46,6 @@ MotionEventGeneric::MotionEventGeneric(Action action,
const PointerProperties& pointer)
: action_(action),
event_time_(event_time),
- id_(0),
action_index_(0),
button_state_(0),
flags_(0) {
@@ -56,7 +55,7 @@ MotionEventGeneric::MotionEventGeneric(Action action,
MotionEventGeneric::MotionEventGeneric(const MotionEventGeneric& other)
: action_(other.action_),
event_time_(other.event_time_),
- id_(other.id_),
+ unique_event_id_(other.unique_event_id_),
action_index_(other.action_index_),
button_state_(other.button_state_),
flags_(other.flags_),
@@ -69,8 +68,8 @@ MotionEventGeneric::MotionEventGeneric(const MotionEventGeneric& other)
MotionEventGeneric::~MotionEventGeneric() {
}
-int MotionEventGeneric::GetId() const {
- return id_;
+uint64 MotionEventGeneric::GetUniqueEventId() const {
+ return unique_event_id_;
}
MotionEvent::Action MotionEventGeneric::GetAction() const {
@@ -219,14 +218,13 @@ void MotionEventGeneric::PushHistoricalEvent(scoped_ptr<MotionEvent> event) {
}
MotionEventGeneric::MotionEventGeneric()
- : action_(ACTION_CANCEL), id_(0), action_index_(0), button_state_(0) {
+ : action_(ACTION_CANCEL), action_index_(0), button_state_(0) {
}
MotionEventGeneric::MotionEventGeneric(const MotionEvent& event,
bool with_history)
: action_(event.GetAction()),
event_time_(event.GetEventTime()),
- id_(event.GetId()),
action_index_(
(action_ == ACTION_POINTER_UP || action_ == ACTION_POINTER_DOWN)
? event.GetActionIndex()
@@ -259,7 +257,7 @@ MotionEventGeneric& MotionEventGeneric::operator=(
const MotionEventGeneric& other) {
action_ = other.action_;
event_time_ = other.event_time_;
- id_ = other.id_;
+ unique_event_id_ = other.unique_event_id_;
action_index_ = other.action_index_;
button_state_ = other.button_state_;
flags_ = other.flags_;

Powered by Google App Engine
This is Rietveld 408576698