| Index: cc/input/scrollbar_animation_controller.h
|
| diff --git a/cc/input/scrollbar_animation_controller.h b/cc/input/scrollbar_animation_controller.h
|
| index d481eae15fbc6467ab1408c5b1252359e024c320..79799b16ad3fcee7cdca9c7aa17972170cfd2e1a 100644
|
| --- a/cc/input/scrollbar_animation_controller.h
|
| +++ b/cc/input/scrollbar_animation_controller.h
|
| @@ -53,9 +53,10 @@ class CC_EXPORT ScrollbarAnimationController {
|
| CreateScrollbarAnimationControllerAuraOverlay(
|
| int scroll_layer_id,
|
| ScrollbarAnimationControllerClient* client,
|
| - base::TimeDelta show_delay,
|
| + base::TimeDelta fade_in_delay,
|
| base::TimeDelta fade_out_delay,
|
| base::TimeDelta fade_out_resize_delay,
|
| + base::TimeDelta fade_in_duration,
|
| base::TimeDelta fade_out_duration,
|
| base::TimeDelta thinning_duration);
|
|
|
| @@ -93,7 +94,7 @@ class CC_EXPORT ScrollbarAnimationController {
|
| bool MouseIsNearScrollbar(ScrollbarOrientation orientation) const;
|
| bool MouseIsNearAnyScrollbar() const;
|
|
|
| - static constexpr float kMouseMoveDistanceToTriggerShow = 30.0f;
|
| + static constexpr float kMouseMoveDistanceToTriggerFadeIn = 30.0f;
|
|
|
| private:
|
| ScrollbarAnimationController(int scroll_layer_id,
|
| @@ -104,9 +105,10 @@ class CC_EXPORT ScrollbarAnimationController {
|
|
|
| ScrollbarAnimationController(int scroll_layer_id,
|
| ScrollbarAnimationControllerClient* client,
|
| - base::TimeDelta show_delay,
|
| + base::TimeDelta fade_in_delay,
|
| base::TimeDelta fade_out_delay,
|
| base::TimeDelta fade_out_resize_delay,
|
| + base::TimeDelta fade_in_duration,
|
| base::TimeDelta fade_out_duration,
|
| base::TimeDelta thinning_duration);
|
|
|
| @@ -124,7 +126,7 @@ class CC_EXPORT ScrollbarAnimationController {
|
|
|
| void Show();
|
|
|
| - void PostDelayedShow();
|
| + void PostDelayedFadeIn();
|
| void PostDelayedFadeOut(bool on_resize);
|
|
|
| bool Captured() const;
|
| @@ -134,29 +136,35 @@ class CC_EXPORT ScrollbarAnimationController {
|
|
|
| void ApplyOpacityToScrollbars(float opacity);
|
|
|
| + // Describes whether the current animation should FadeIn or FadeOut.
|
| + enum AnimationChange { NONE, FADE_IN, FADE_OUT };
|
| +
|
| ScrollbarAnimationControllerClient* client_;
|
|
|
| base::TimeTicks last_awaken_time_;
|
|
|
| - // show_delay_ is only for the case where the mouse hovers near the screen
|
| + // fade_in_delay_ is only for the case where the mouse hovers near the screen
|
| // edge.
|
| - base::TimeDelta show_delay_;
|
| + base::TimeDelta fade_in_delay_;
|
| base::TimeDelta fade_out_delay_;
|
| base::TimeDelta fade_out_resize_delay_;
|
|
|
| + base::TimeDelta fade_in_duration_;
|
| + base::TimeDelta fade_out_duration_;
|
| +
|
| bool need_trigger_scrollbar_show_;
|
|
|
| bool is_animating_;
|
| + AnimationChange animation_change_;
|
|
|
| const int scroll_layer_id_;
|
| bool currently_scrolling_;
|
| bool show_in_fast_scroll_;
|
|
|
| - base::CancelableClosure delayed_scrollbar_show_;
|
| + base::CancelableClosure delayed_scrollbar_fade_in_;
|
| base::CancelableClosure delayed_scrollbar_fade_out_;
|
|
|
| float opacity_;
|
| - base::TimeDelta fade_out_duration_;
|
|
|
| const bool show_scrollbars_on_scroll_gesture_;
|
| const bool need_thinning_animation_;
|
|
|