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

Side by Side 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: Motion events 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/gesture_detection/motion_event_generic.h" 5 #include "ui/events/gesture_detection/motion_event_generic.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 PushHistoricalEvent(other.historical_events_[h]->Clone()); 66 PushHistoricalEvent(other.historical_events_[h]->Clone());
67 } 67 }
68 68
69 MotionEventGeneric::~MotionEventGeneric() { 69 MotionEventGeneric::~MotionEventGeneric() {
70 } 70 }
71 71
72 int MotionEventGeneric::GetId() const { 72 int MotionEventGeneric::GetId() const {
73 return id_; 73 return id_;
74 } 74 }
75 75
76 uint64 MotionEventGeneric::GetUniqueId() const {
77 return unique_id_;
78 }
79
76 MotionEvent::Action MotionEventGeneric::GetAction() const { 80 MotionEvent::Action MotionEventGeneric::GetAction() const {
77 return action_; 81 return action_;
78 } 82 }
79 83
80 int MotionEventGeneric::GetActionIndex() const { 84 int MotionEventGeneric::GetActionIndex() const {
81 DCHECK(action_ == ACTION_POINTER_DOWN || action_ == ACTION_POINTER_UP); 85 DCHECK(action_ == ACTION_POINTER_DOWN || action_ == ACTION_POINTER_UP);
82 DCHECK_GE(action_index_, 0); 86 DCHECK_GE(action_index_, 0);
83 DCHECK_LT(action_index_, static_cast<int>(pointers_->size())); 87 DCHECK_LT(action_index_, static_cast<int>(pointers_->size()));
84 return action_index_; 88 return action_index_;
85 } 89 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 PushHistoricalEvent(other.historical_events_[h]->Clone()); 267 PushHistoricalEvent(other.historical_events_[h]->Clone());
264 return *this; 268 return *this;
265 } 269 }
266 270
267 void MotionEventGeneric::PopPointer() { 271 void MotionEventGeneric::PopPointer() {
268 DCHECK_GT(pointers_->size(), 0U); 272 DCHECK_GT(pointers_->size(), 0U);
269 pointers_->pop_back(); 273 pointers_->pop_back();
270 } 274 }
271 275
272 } // namespace ui 276 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698