| Index: cc/input/scrollbar_animation_controller_thinning.h
|
| diff --git a/cc/input/scrollbar_animation_controller_thinning.h b/cc/input/scrollbar_animation_controller_thinning.h
|
| index d1d4ee0bac8539ade7052c282b7914c4e863fb0e..e3b2ab8ede10ee87bd50757474f89123620b0040 100644
|
| --- a/cc/input/scrollbar_animation_controller_thinning.h
|
| +++ b/cc/input/scrollbar_animation_controller_thinning.h
|
| @@ -24,7 +24,8 @@ class CC_EXPORT ScrollbarAnimationControllerThinning
|
| ScrollbarAnimationControllerClient* client,
|
| base::TimeDelta delay_before_starting,
|
| base::TimeDelta resize_delay_before_starting,
|
| - base::TimeDelta duration);
|
| + base::TimeDelta fade_duration,
|
| + base::TimeDelta thinning_duration);
|
|
|
| ~ScrollbarAnimationControllerThinning() override;
|
|
|
| @@ -47,34 +48,42 @@ class CC_EXPORT ScrollbarAnimationControllerThinning
|
| ScrollbarAnimationControllerClient* client,
|
| base::TimeDelta delay_before_starting,
|
| base::TimeDelta resize_delay_before_starting,
|
| - base::TimeDelta duration);
|
| + base::TimeDelta fade_duration,
|
| + base::TimeDelta thinning_duration);
|
|
|
| void RunAnimationFrame(float progress) override;
|
| + const base::TimeDelta& Duration() override;
|
|
|
| private:
|
| - // Describes whether the current animation should INCREASE (darken / thicken)
|
| - // a bar or DECREASE it (lighten / thin).
|
| + // Describes whether the current animation should INCREASE (thicken)
|
| + // a bar or DECREASE it (thin).
|
| enum AnimationChange { NONE, INCREASE, DECREASE };
|
| - float OpacityAtAnimationProgress(float progress);
|
| - float ThumbThicknessScaleAtAnimationProgress(float progress);
|
| + enum AnimatingProperty { OPACITY, THICKNESS };
|
| + float ThumbThicknessScaleAt(float progress);
|
| float AdjustScale(float new_value,
|
| float current_value,
|
| AnimationChange animation_change,
|
| float min_value,
|
| float max_value);
|
| - void ApplyOpacityAndThumbThicknessScale(float opacity,
|
| - float thumb_thickness_scale);
|
| + void ApplyOpacity(float opacity);
|
| + void ApplyThumbThicknessScale(float thumb_thickness_scale);
|
|
|
| + void SetCurrentAnimatingProperty(AnimatingProperty property);
|
| +
|
| + float opacity_;
|
| bool captured_;
|
| bool mouse_is_over_scrollbar_;
|
| bool mouse_is_near_scrollbar_;
|
| // Are we narrowing or thickening the bars.
|
| AnimationChange thickness_change_;
|
| - // Are we darkening or lightening the bars.
|
| - AnimationChange opacity_change_;
|
| // How close should the mouse be to the scrollbar before we thicken it.
|
| float mouse_move_distance_to_trigger_animation_;
|
|
|
| + base::TimeDelta fade_duration_;
|
| + base::TimeDelta thinning_duration_;
|
| +
|
| + AnimatingProperty current_animating_property_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ScrollbarAnimationControllerThinning);
|
| };
|
|
|
|
|