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

Unified Diff: ui/events/event_utils.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/event_utils.h ('k') | ui/events/events_default.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_utils.cc
diff --git a/ui/events/event_utils.cc b/ui/events/event_utils.cc
index aa7181a7d3fb54f9c8593bb829212f4ce30acb29..a079ff22b620093e8673b61d7945ead6a257393b 100644
--- a/ui/events/event_utils.cc
+++ b/ui/events/event_utils.cc
@@ -61,9 +61,8 @@ int RegisterCustomEventType() {
return ++g_custom_event_types;
}
-base::TimeDelta EventTimeForNow() {
- return base::TimeDelta::FromInternalValue(
- base::TimeTicks::Now().ToInternalValue());
+base::TimeTicks EventTimeForNow() {
+ return base::TimeTicks::Now();
}
bool ShouldDefaultToNaturalScroll() {
@@ -86,8 +85,8 @@ display::Display::TouchSupport GetInternalDisplayTouchSupport() {
}
void ComputeEventLatencyOS(const base::NativeEvent& native_event) {
- base::TimeDelta current_time = EventTimeForNow();
- base::TimeDelta time_stamp = EventTimeFromNative(native_event);
+ base::TimeTicks current_time = EventTimeForNow();
+ base::TimeTicks time_stamp = EventTimeFromNative(native_event);
base::TimeDelta delta = current_time - time_stamp;
EventType type = EventTypeFromNative(native_event);
« no previous file with comments | « ui/events/event_utils.h ('k') | ui/events/events_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698