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

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: 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 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 PushHistoricalEvent(other.historical_events_[h]->Clone()); 273 PushHistoricalEvent(other.historical_events_[h]->Clone());
270 return *this; 274 return *this;
271 } 275 }
272 276
273 void MotionEventGeneric::PopPointer() { 277 void MotionEventGeneric::PopPointer() {
274 DCHECK_GT(pointers_->size(), 0U); 278 DCHECK_GT(pointers_->size(), 0U);
275 pointers_->pop_back(); 279 pointers_->pop_back();
276 } 280 }
277 281
278 } // namespace ui 282 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698