Index: cc/input/top_controls_manager.cc |
diff --git a/cc/input/top_controls_manager.cc b/cc/input/top_controls_manager.cc |
index a0e61aaa325b49a83021825cf17d78626c5b332a..1220a0071193e43eb60c6111bb64726904b9a888 100644 |
--- a/cc/input/top_controls_manager.cc |
+++ b/cc/input/top_controls_manager.cc |
@@ -136,11 +136,11 @@ void TopControlsManager::SetControlsTopOffset(float controls_top_offset) { |
client_->DidChangeTopControlsPosition(); |
} |
-gfx::Vector2dF TopControlsManager::Animate(base::TimeTicks monotonic_time) { |
+gfx::Vector2dF TopControlsManager::Animate(gfx::FrameTime monotonic_time) { |
if (!top_controls_animation_ || !client_->HaveRootScrollLayer()) |
return gfx::Vector2dF(); |
- double time = (monotonic_time - base::TimeTicks()).InMillisecondsF(); |
+ double time = monotonic_time.Unsafe_InMillisecondsF(); |
float old_offset = controls_top_offset_; |
SetControlsTopOffset(top_controls_animation_->GetValue(time)); |
@@ -175,7 +175,7 @@ void TopControlsManager::SetupAnimation(AnimationDirection direction) { |
top_controls_animation_ = KeyframedFloatAnimationCurve::Create(); |
double start_time = |
- (gfx::FrameTime::Now() - base::TimeTicks()).InMillisecondsF(); |
+ gfx::FrameTime::Now().Unsafe_InMillisecondsF(); |
top_controls_animation_->AddKeyframe( |
FloatKeyframe::Create(start_time, controls_top_offset_, |
scoped_ptr<TimingFunction>())); |
@@ -213,11 +213,12 @@ void TopControlsManager::StartAnimationIfNecessary() { |
} |
} |
-bool TopControlsManager::IsAnimationCompleteAtTime(base::TimeTicks time) { |
+bool TopControlsManager::IsAnimationCompleteAtTime( |
+ gfx::FrameTime time) { |
if (!top_controls_animation_) |
return true; |
- double time_ms = (time - base::TimeTicks()).InMillisecondsF(); |
+ double time_ms = time.Unsafe_InMillisecondsF(); |
float new_offset = top_controls_animation_->GetValue(time_ms); |
if ((animation_direction_ == SHOWING_CONTROLS && new_offset >= 0) || |