| Index: ui/views/animation/ink_drop_hover.h
|
| diff --git a/ui/views/animation/ink_drop_hover.h b/ui/views/animation/ink_drop_hover.h
|
| index e6bd62715008a60db01790f645fe3a10947f400a..e1cd2d42e5e0aa267be7dac32181277f8c7ac276 100644
|
| --- a/ui/views/animation/ink_drop_hover.h
|
| +++ b/ui/views/animation/ink_drop_hover.h
|
| @@ -26,17 +26,22 @@ class InkDropHoverTestApi;
|
| } // namespace test
|
|
|
| class RoundedRectangleLayerDelegate;
|
| +class InkDropHoverObserver;
|
|
|
| // Manages fade in/out animations for a painted Layer that is used to provide
|
| // visual feedback on ui::Views for mouse hover states.
|
| class VIEWS_EXPORT InkDropHover {
|
| public:
|
| + enum AnimationType { FADE_IN, FADE_OUT };
|
| +
|
| InkDropHover(const gfx::Size& size,
|
| int corner_radius,
|
| const gfx::Point& center_point,
|
| SkColor color);
|
| virtual ~InkDropHover();
|
|
|
| + void set_observer(InkDropHoverObserver* observer) { observer_ = observer; }
|
| +
|
| void set_explode_size(const gfx::Size& size) { explode_size_ = size; }
|
|
|
| // Returns true if the hover animation is either in the process of fading
|
| @@ -61,12 +66,10 @@ class VIEWS_EXPORT InkDropHover {
|
| private:
|
| friend class test::InkDropHoverTestApi;
|
|
|
| - enum HoverAnimationType { FADE_IN, FADE_OUT };
|
| -
|
| // Animates a fade in/out as specified by |animation_type| combined with a
|
| // transformation from the |initial_size| to the |target_size| over the given
|
| // |duration|.
|
| - void AnimateFade(HoverAnimationType animation_type,
|
| + void AnimateFade(AnimationType animation_type,
|
| const base::TimeDelta& duration,
|
| const gfx::Size& initial_size,
|
| const gfx::Size& target_size);
|
| @@ -74,9 +77,14 @@ class VIEWS_EXPORT InkDropHover {
|
| // Calculates the Transform to apply to |layer_| for the given |size|.
|
| gfx::Transform CalculateTransform(const gfx::Size& size) const;
|
|
|
| + // The callback that will be invoked when a fade in/out animation is started.
|
| + void AnimationStartedCallback(
|
| + AnimationType animation_type,
|
| + const ui::CallbackLayerAnimationObserver& observer);
|
| +
|
| // The callback that will be invoked when a fade in/out animation is complete.
|
| bool AnimationEndedCallback(
|
| - HoverAnimationType animation_type,
|
| + AnimationType animation_type,
|
| const ui::CallbackLayerAnimationObserver& observer);
|
|
|
| // The size of the hover shape when fully faded in.
|
| @@ -99,6 +107,8 @@ class VIEWS_EXPORT InkDropHover {
|
| // The visual hover layer that is painted by |layer_delegate_|.
|
| scoped_ptr<ui::Layer> layer_;
|
|
|
| + InkDropHoverObserver* observer_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(InkDropHover);
|
| };
|
|
|
|
|