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

Unified Diff: content/common/input/synthetic_web_input_event_builders.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
Index: content/common/input/synthetic_web_input_event_builders.cc
diff --git a/content/common/input/synthetic_web_input_event_builders.cc b/content/common/input/synthetic_web_input_event_builders.cc
index e7e7d49176a13a81de4ade4130cdb6e7eb061e1d..6f8d8da376361512d85f56c48afce2b6aeac441b 100644
--- a/content/common/input/synthetic_web_input_event_builders.cc
+++ b/content/common/input/synthetic_web_input_event_builders.cc
@@ -170,7 +170,7 @@ WebGestureEvent SyntheticWebGestureEventBuilder::BuildFling(
SyntheticWebTouchEvent::SyntheticWebTouchEvent() : WebTouchEvent() {
uniqueTouchEventId = ui::GetNextTouchEventId();
- SetTimestamp(base::TimeTicks::Now() - base::TimeTicks());
+ SetTimestamp(base::TimeTicks::Now());
}
void SyntheticWebTouchEvent::ResetPoints() {
@@ -237,8 +237,8 @@ void SyntheticWebTouchEvent::CancelPoint(int index) {
WebInputEvent::TouchCancel, timeStampSeconds, this);
}
-void SyntheticWebTouchEvent::SetTimestamp(base::TimeDelta timestamp) {
- timeStampSeconds = timestamp.InSecondsF();
+void SyntheticWebTouchEvent::SetTimestamp(base::TimeTicks timestamp) {
+ timeStampSeconds = ui::EventTimeStampToSeconds(timestamp);
}
} // namespace content
« no previous file with comments | « content/common/input/synthetic_web_input_event_builders.h ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698