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

Unified Diff: content/browser/renderer_host/ui_events_helper.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: Updates Created 4 years, 7 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
Index: content/browser/renderer_host/ui_events_helper.cc
diff --git a/content/browser/renderer_host/ui_events_helper.cc b/content/browser/renderer_host/ui_events_helper.cc
index a062303cc07e63ebe066c615d61f5640e46030db..6c958df4547c4250d3a671f7ff728a8e06cdc9ef 100644
--- a/content/browser/renderer_host/ui_events_helper.cc
+++ b/content/browser/renderer_host/ui_events_helper.cc
@@ -64,8 +64,8 @@ bool MakeUITouchEventsFromWebTouchEvents(
}
int flags = WebEventModifiersToEventFlags(touch.modifiers);
- base::TimeDelta timestamp = base::TimeDelta::FromMicroseconds(
- static_cast<int64_t>(touch.timeStampSeconds * 1000000));
+ base::TimeTicks timestamp =
+ base::TimeTicks() + base::TimeDelta::FromSecondsD(touch.timeStampSeconds);
for (unsigned i = 0; i < touch.touchesLength; ++i) {
const blink::WebTouchPoint& point = touch.touches[i];
if (WebTouchPointStateToEventType(point.state) != type)

Powered by Google App Engine
This is Rietveld 408576698