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

Side by Side Diff: ui/events/gestures/motion_event_aura.cc

Issue 1975533002: Change ui::Event::time_stamp from TimeDelta to TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/gestures/motion_event_aura.h" 5 #include "ui/events/gestures/motion_event_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/events/gesture_detection/gesture_configuration.h" 8 #include "ui/events/gesture_detection/gesture_configuration.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 UpdateTouch(touch); 93 UpdateTouch(touch);
94 break; 94 break;
95 default: 95 default:
96 NOTREACHED(); 96 NOTREACHED();
97 return false; 97 return false;
98 } 98 }
99 99
100 UpdateCachedAction(touch); 100 UpdateCachedAction(touch);
101 set_unique_event_id(touch.unique_event_id()); 101 set_unique_event_id(touch.unique_event_id());
102 set_flags(touch.flags()); 102 set_flags(touch.flags());
103 set_event_time(touch.time_stamp() + base::TimeTicks()); 103 set_event_time(touch.time_stamp());
104 return true; 104 return true;
105 } 105 }
106 106
107 void MotionEventAura::CleanupRemovedTouchPoints(const TouchEvent& event) { 107 void MotionEventAura::CleanupRemovedTouchPoints(const TouchEvent& event) {
108 if (event.type() != ET_TOUCH_RELEASED && 108 if (event.type() != ET_TOUCH_RELEASED &&
109 event.type() != ET_TOUCH_CANCELLED) { 109 event.type() != ET_TOUCH_CANCELLED) {
110 return; 110 return;
111 } 111 }
112 112
113 DCHECK(GetPointerCount()); 113 DCHECK(GetPointerCount());
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 int MotionEventAura::GetIndexFromId(int id) const { 170 int MotionEventAura::GetIndexFromId(int id) const {
171 int index = FindPointerIndexOfId(id); 171 int index = FindPointerIndexOfId(id);
172 // TODO(tdresser): remove these checks once crbug.com/525189 is fixed. 172 // TODO(tdresser): remove these checks once crbug.com/525189 is fixed.
173 CHECK_GE(index, 0); 173 CHECK_GE(index, 0);
174 CHECK_LT(index, static_cast<int>(GetPointerCount())); 174 CHECK_LT(index, static_cast<int>(GetPointerCount()));
175 return index; 175 return index;
176 } 176 }
177 177
178 } // namespace ui 178 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gestures/gesture_provider_aura_unittest.cc ('k') | ui/events/gestures/motion_event_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698