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

Side by Side Diff: ui/events/gestures/motion_event_aura.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 // MSVC++ requires this to be set before any other includes to get M_PI. 5 // MSVC++ requires this to be set before any other includes to get M_PI.
6 #define _USE_MATH_DEFINES 6 #define _USE_MATH_DEFINES
7 7
8 #include "ui/events/gestures/motion_event_aura.h" 8 #include "ui/events/gestures/motion_event_aura.h"
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 break; 118 break;
119 case ET_TOUCH_MOVED: 119 case ET_TOUCH_MOVED:
120 UpdateTouch(touch); 120 UpdateTouch(touch);
121 break; 121 break;
122 default: 122 default:
123 NOTREACHED(); 123 NOTREACHED();
124 return false; 124 return false;
125 } 125 }
126 126
127 UpdateCachedAction(touch); 127 UpdateCachedAction(touch);
128 set_unique_id(touch.unique_event_id());
128 set_flags(touch.flags()); 129 set_flags(touch.flags());
129 set_event_time(touch.time_stamp() + base::TimeTicks()); 130 set_event_time(touch.time_stamp() + base::TimeTicks());
130 return true; 131 return true;
131 } 132 }
132 133
133 int MotionEventAura::GetId() const { 134 int MotionEventAura::GetId() const {
134 return GetPointerId(0); 135 return GetPointerId(0);
135 } 136 }
136 137
137 void MotionEventAura::CleanupRemovedTouchPoints(const TouchEvent& event) { 138 void MotionEventAura::CleanupRemovedTouchPoints(const TouchEvent& event) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 197 }
197 198
198 int MotionEventAura::GetIndexFromId(int id) const { 199 int MotionEventAura::GetIndexFromId(int id) const {
199 int index = FindPointerIndexOfId(id); 200 int index = FindPointerIndexOfId(id);
200 DCHECK_GE(index, 0); 201 DCHECK_GE(index, 0);
201 DCHECK_LT(index, static_cast<int>(GetPointerCount())); 202 DCHECK_LT(index, static_cast<int>(GetPointerCount()));
202 return index; 203 return index;
203 } 204 }
204 205
205 } // namespace ui 206 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698