| Index: cc/input/single_scrollbar_animation_controller_thinning.h
|
| diff --git a/cc/input/scrollbar_animation_controller_thinning.h b/cc/input/single_scrollbar_animation_controller_thinning.h
|
| similarity index 75%
|
| copy from cc/input/scrollbar_animation_controller_thinning.h
|
| copy to cc/input/single_scrollbar_animation_controller_thinning.h
|
| index 0b393088b89c209f5771c617781c4bce7a264f89..b62b215d6e08675ba3cace8a5ca5128eca9e49f9 100644
|
| --- a/cc/input/scrollbar_animation_controller_thinning.h
|
| +++ b/cc/input/single_scrollbar_animation_controller_thinning.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
|
| -#define CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
|
| +#ifndef CC_INPUT_SINGLE_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
|
| +#define CC_INPUT_SINGLE_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
|
|
|
| #include <memory>
|
|
|
| @@ -13,24 +13,25 @@
|
|
|
| namespace cc {
|
|
|
| -// Scrollbar animation that partially fades and thins after an idle delay,
|
| -// and reacts to mouse movements.
|
| -class CC_EXPORT ScrollbarAnimationControllerThinning
|
| +// ScrollbarAnimationControllerThinning for one scrollbar
|
| +class CC_EXPORT SingleScrollbarAnimationControllerThinning
|
| : public ScrollbarAnimationController {
|
| public:
|
| - static std::unique_ptr<ScrollbarAnimationControllerThinning> Create(
|
| + static std::unique_ptr<SingleScrollbarAnimationControllerThinning> Create(
|
| int scroll_layer_id,
|
| + ScrollbarOrientation orientation,
|
| ScrollbarAnimationControllerClient* client,
|
| base::TimeDelta delay_before_starting,
|
| base::TimeDelta resize_delay_before_starting,
|
| base::TimeDelta fade_duration,
|
| base::TimeDelta thinning_duration);
|
|
|
| - ~ScrollbarAnimationControllerThinning() override;
|
| + ~SingleScrollbarAnimationControllerThinning() override {}
|
|
|
| void set_mouse_move_distance_for_test(float distance) {
|
| mouse_move_distance_to_trigger_animation_ = distance;
|
| }
|
| + ScrollbarOrientation orientation() const { return orientation_; }
|
| bool mouse_is_over_scrollbar() const { return mouse_is_over_scrollbar_; }
|
| bool mouse_is_near_scrollbar() const { return mouse_is_near_scrollbar_; }
|
|
|
| @@ -39,21 +40,21 @@ class CC_EXPORT ScrollbarAnimationControllerThinning
|
| void DidMouseDown() override;
|
| void DidMouseUp() override;
|
| void DidMouseLeave() override;
|
| - void DidMouseMoveNear(float distance) override;
|
| bool ScrollbarsHidden() const override;
|
| + void RunAnimationFrame(float progress) override;
|
| + const base::TimeDelta& Duration() override;
|
| + void DidMouseMoveNear(ScrollbarOrientation, float) override;
|
|
|
| protected:
|
| - ScrollbarAnimationControllerThinning(
|
| + SingleScrollbarAnimationControllerThinning(
|
| int scroll_layer_id,
|
| + ScrollbarOrientation orientation,
|
| ScrollbarAnimationControllerClient* client,
|
| base::TimeDelta delay_before_starting,
|
| base::TimeDelta resize_delay_before_starting,
|
| 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 (thicken)
|
| // a bar or DECREASE it (thin).
|
| @@ -70,6 +71,7 @@ class CC_EXPORT ScrollbarAnimationControllerThinning
|
|
|
| void SetCurrentAnimatingProperty(AnimatingProperty property);
|
|
|
| + ScrollbarOrientation orientation_;
|
| float opacity_;
|
| bool captured_;
|
| bool mouse_is_over_scrollbar_;
|
| @@ -84,9 +86,9 @@ class CC_EXPORT ScrollbarAnimationControllerThinning
|
|
|
| AnimatingProperty current_animating_property_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(ScrollbarAnimationControllerThinning);
|
| + DISALLOW_COPY_AND_ASSIGN(SingleScrollbarAnimationControllerThinning);
|
| };
|
|
|
| } // namespace cc
|
|
|
| -#endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
|
| +#endif // CC_INPUT_SINGLE_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
|
|
|