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

Side by Side Diff: ui/events/events_default.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
« no previous file with comments | « ui/events/event_utils.cc ('k') | ui/events/events_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/event.h" 5 #include "ui/events/event.h"
6 #include "ui/events/event_constants.h" 6 #include "ui/events/event_constants.h"
7 #include "ui/events/event_utils.h" 7 #include "ui/events/event_utils.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
11 base::TimeDelta EventTimeFromNative(const base::NativeEvent& native_event) { 11 base::TimeTicks EventTimeFromNative(const base::NativeEvent& native_event) {
12 const ui::Event* event = static_cast<const ui::Event*>(native_event); 12 const ui::Event* event = static_cast<const ui::Event*>(native_event);
13 return event->time_stamp(); 13 return event->time_stamp();
14 } 14 }
15 15
16 int EventFlagsFromNative(const base::NativeEvent& native_event) { 16 int EventFlagsFromNative(const base::NativeEvent& native_event) {
17 const ui::Event* event = static_cast<const ui::Event*>(native_event); 17 const ui::Event* event = static_cast<const ui::Event*>(native_event);
18 return event->flags(); 18 return event->flags();
19 } 19 }
20 20
21 EventType EventTypeFromNative(const base::NativeEvent& native_event) { 21 EventType EventTypeFromNative(const base::NativeEvent& native_event) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 *vx_ordinal = event->x_offset_ordinal(); 149 *vx_ordinal = event->x_offset_ordinal();
150 if (vy_ordinal) 150 if (vy_ordinal)
151 *vy_ordinal = event->y_offset_ordinal(); 151 *vy_ordinal = event->y_offset_ordinal();
152 if (is_cancel) 152 if (is_cancel)
153 *is_cancel = event->type() == ET_SCROLL_FLING_CANCEL; 153 *is_cancel = event->type() == ET_SCROLL_FLING_CANCEL;
154 154
155 return true; 155 return true;
156 } 156 }
157 157
158 } // namespace ui 158 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/event_utils.cc ('k') | ui/events/events_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698