| Index: cc/animation/scrollbar_animation_controller_linear_fade.cc
|
| diff --git a/cc/animation/scrollbar_animation_controller_linear_fade.cc b/cc/animation/scrollbar_animation_controller_linear_fade.cc
|
| index 863959b84c27691f9afe1cca9628b399fc3b04e9..52298d19aeda08a1f2ffd5e6ad9d579b66dae4e7 100644
|
| --- a/cc/animation/scrollbar_animation_controller_linear_fade.cc
|
| +++ b/cc/animation/scrollbar_animation_controller_linear_fade.cc
|
| @@ -37,17 +37,17 @@ bool ScrollbarAnimationControllerLinearFade::IsAnimating() const {
|
| }
|
|
|
| base::TimeDelta ScrollbarAnimationControllerLinearFade::DelayBeforeStart(
|
| - base::TimeTicks now) const {
|
| + gfx::FrameTime now) const {
|
| if (now > last_awaken_time_ + fadeout_delay_)
|
| return base::TimeDelta();
|
| return fadeout_delay_ - (now - last_awaken_time_);
|
| }
|
|
|
| -bool ScrollbarAnimationControllerLinearFade::Animate(base::TimeTicks now) {
|
| +bool ScrollbarAnimationControllerLinearFade::Animate(gfx::FrameTime now) {
|
| float opacity = OpacityAtTime(now);
|
| ApplyOpacityToScrollbars(opacity);
|
| if (!opacity)
|
| - last_awaken_time_ = base::TimeTicks();
|
| + last_awaken_time_ = gfx::FrameTime();
|
| return IsAnimating() && DelayBeforeStart(now) == base::TimeDelta();
|
| }
|
|
|
| @@ -57,7 +57,7 @@ void ScrollbarAnimationControllerLinearFade::DidScrollGestureBegin() {
|
| }
|
|
|
| void ScrollbarAnimationControllerLinearFade::DidScrollGestureEnd(
|
| - base::TimeTicks now) {
|
| + gfx::FrameTime now) {
|
| // The animation should not be triggered if no scrolling has occurred.
|
| if (scroll_gesture_has_scrolled_)
|
| last_awaken_time_ = now;
|
| @@ -65,18 +65,18 @@ void ScrollbarAnimationControllerLinearFade::DidScrollGestureEnd(
|
| scroll_gesture_in_progress_ = false;
|
| }
|
|
|
| -void ScrollbarAnimationControllerLinearFade::DidMouseMoveOffScrollbar(
|
| - base::TimeTicks now) {
|
| +void ScrollbarAnimationControllerLinearFade::DidMouseMoveOffScrollbar(\
|
| + gfx::FrameTime now) {
|
| // Ignore mouse move events.
|
| }
|
|
|
| bool ScrollbarAnimationControllerLinearFade::DidScrollUpdate(
|
| - base::TimeTicks now) {
|
| + gfx::FrameTime now) {
|
| ApplyOpacityToScrollbars(1.0f);
|
| // The animation should only be activated if the scroll updated occurred
|
| // programatically, outside the scope of a scroll gesture.
|
| if (scroll_gesture_in_progress_) {
|
| - last_awaken_time_ = base::TimeTicks();
|
| + last_awaken_time_ = gfx::FrameTime();
|
| scroll_gesture_has_scrolled_ = true;
|
| return false;
|
| }
|
| @@ -86,13 +86,13 @@ bool ScrollbarAnimationControllerLinearFade::DidScrollUpdate(
|
| }
|
|
|
| bool ScrollbarAnimationControllerLinearFade::DidMouseMoveNear(
|
| - base::TimeTicks now, float distance) {
|
| + gfx::FrameTime now, float distance) {
|
| // Ignore mouse move events.
|
| return false;
|
| }
|
|
|
| float ScrollbarAnimationControllerLinearFade::OpacityAtTime(
|
| - base::TimeTicks now) {
|
| + gfx::FrameTime now) {
|
| if (scroll_gesture_has_scrolled_)
|
| return 1.0f;
|
|
|
|
|