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

Unified Diff: content/renderer/input/input_handler_proxy.cc

Issue 178103004: Removing the use of base::Time inside the LayerTreeHost system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing to a common ToWebKitTime function. Created 6 years, 10 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
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/thread_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/input/input_handler_proxy.cc
diff --git a/content/renderer/input/input_handler_proxy.cc b/content/renderer/input/input_handler_proxy.cc
index 789cb58f26f08cc2904bd29e5deb6f54e3a16c45..52a66577bc4ba3406264a4ea1572d3e0a6378ad3 100644
--- a/content/renderer/input/input_handler_proxy.cc
+++ b/content/renderer/input/input_handler_proxy.cc
@@ -28,10 +28,6 @@ namespace {
// Validate provided event timestamps that interact with animation timestamps.
const double kBadTimestampDeltaFromNowInS = 60. * 60. * 24. * 7.;
-double InSecondsF(const base::TimeTicks& time) {
- return (time - base::TimeTicks()).InSecondsF();
-}
-
void SendScrollLatencyUma(const WebInputEvent& event,
const ui::LatencyInfo& latency_info) {
if (!(event.type == WebInputEvent::GestureScrollBegin ||
@@ -284,9 +280,9 @@ InputHandlerProxy::HandleGestureFling(
this);
if (gesture_event.timeStampSeconds) {
fling_parameters_.startTime = gesture_event.timeStampSeconds;
- DCHECK_LT(fling_parameters_.startTime -
- InSecondsF(gfx::FrameTime::Now()),
- kBadTimestampDeltaFromNowInS);
+ DCHECK_LT(
+ fling_parameters_.startTime - gfx::FrameTime::Now().ToWebKit(),
+ kBadTimestampDeltaFromNowInS);
}
fling_parameters_.delta =
WebFloatPoint(gesture_event.data.flingStart.velocityX,
@@ -328,7 +324,7 @@ void InputHandlerProxy::Animate(base::TimeTicks time) {
if (!fling_curve_)
return;
- double monotonic_time_sec = InSecondsF(time);
+ double monotonic_time_sec = time.ToWebKit();
if (!fling_parameters_.startTime) {
fling_parameters_.startTime = monotonic_time_sec;
input_handler_->ScheduleAnimation();
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/thread_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698