Chromium Code Reviews| Index: ui/views/animation/ink_drop_animation_controller_impl.h |
| diff --git a/ui/views/animation/ink_drop_animation_controller_impl.h b/ui/views/animation/ink_drop_animation_controller_impl.h |
| index e0759750e9fdbf5f727c885366714967298fd32a..31971811d4cc904fd9c2d6dcd8abbe4ded4480a4 100644 |
| --- a/ui/views/animation/ink_drop_animation_controller_impl.h |
| +++ b/ui/views/animation/ink_drop_animation_controller_impl.h |
| @@ -12,6 +12,7 @@ |
| #include "ui/gfx/geometry/size.h" |
| #include "ui/views/animation/ink_drop_animation_controller.h" |
| #include "ui/views/animation/ink_drop_animation_observer.h" |
| +#include "ui/views/animation/ink_drop_hover_observer.h" |
| #include "ui/views/views_export.h" |
| namespace base { |
| @@ -31,7 +32,8 @@ class InkDropAnimationControllerFactoryTest; |
| // A functional implementation of an InkDropAnimationController. |
| class VIEWS_EXPORT InkDropAnimationControllerImpl |
| : public InkDropAnimationController, |
| - public InkDropAnimationObserver { |
| + public InkDropAnimationObserver, |
| + public InkDropHoverObserver { |
| public: |
| // Constructs an ink drop controller that will attach the ink drop to the |
| // given |ink_drop_host|. |
| @@ -66,6 +68,12 @@ class VIEWS_EXPORT InkDropAnimationControllerImpl |
| // Destroys the current |hover_|. |
| void DestroyInkDropHover(); |
| + // Conditionally adds the |root_layer_| to the |ink_drop_host_|. |
| + void AddRootLayerToHost(); |
|
varkha
2016/04/28 20:35:00
MaybeAddRootLayerToHost? Also I think it could be
bruthig
2016/04/29 11:02:34
I've opted to use the 'IfNeeded' Suffix. WDYT?
|
| + |
| + // Conditionally removes the |root_layer_| from the |ink_drop_host_|. |
| + void RemoveRootLayerFromHost(); |
| + |
| // Returns true if the hover animation is in the process of fading in or |
| // is visible. |
| bool IsHoverFadingInOrVisible() const; |
| @@ -75,6 +83,11 @@ class VIEWS_EXPORT InkDropAnimationControllerImpl |
| void AnimationEnded(InkDropState ink_drop_state, |
| InkDropAnimationEndedReason reason) override; |
| + // views::InkDropHoverObserver: |
| + void AnimationStarted(InkDropHover::AnimationType animation_type) override; |
| + void AnimationEnded(InkDropHover::AnimationType animation_type, |
| + InkDropAnimationEndedReason reason) override; |
| + |
| // Enables or disables the hover state based on |is_hovered| and if an |
| // animation is triggered it will be scheduled to have the given |
| // |animation_duration|. If |explode| is true the hover will expand as it |
| @@ -102,6 +115,9 @@ class VIEWS_EXPORT InkDropAnimationControllerImpl |
| // from the InkDropHost. |
| std::unique_ptr<ui::Layer> root_layer_; |
| + // True when the |root_layer_| has been added to the |ink_drop_host_|. |
| + bool root_layer_added_to_host_; |
| + |
| // The current InkDropHover. Lazily created using CreateInkDropHover(); |
|
varkha
2016/04/28 20:35:00
Not sure about it myself and definitely not in thi
bruthig
2016/04/29 11:02:34
100% agreed. I was thinking InkDropRipple and Ink
|
| std::unique_ptr<InkDropHover> hover_; |