Chromium Code Reviews| Index: ui/views/animation/ink_drop_impl.h |
| diff --git a/ui/views/animation/ink_drop_impl.h b/ui/views/animation/ink_drop_impl.h |
| index dec07a9a981a7842592a5744c11303ded5803c64..4c4df2ef9a3cc4b836623af2909b46d53c03ddec 100644 |
| --- a/ui/views/animation/ink_drop_impl.h |
| +++ b/ui/views/animation/ink_drop_impl.h |
| @@ -45,6 +45,7 @@ class VIEWS_EXPORT InkDropImpl : public InkDrop, |
| void AnimateToState(InkDropState ink_drop_state) override; |
| void SnapToActivated() override; |
| void SetHovered(bool is_hovered) override; |
| + void SetFocused(bool is_focused) override; |
| private: |
| friend class test::InkDropImplTestApi; |
| @@ -89,13 +90,16 @@ class VIEWS_EXPORT InkDropImpl : public InkDrop, |
| void AnimationEnded(InkDropHover::AnimationType animation_type, |
| InkDropAnimationEndedReason reason) override; |
| - // Enables or disables the hover state based on |is_hovered| and if an |
| + // Enables or disables the hover state based on |should_highlight| 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 |
| - // fades out. |explode| is ignored when |is_hovered| is true. |
| - void SetHoveredInternal(bool is_hovered, |
| - base::TimeDelta animation_duration, |
| - bool explode); |
| + // fades out. |explode| is ignored when |should_higlight| is true. |
| + void SetHighlight(bool should_highlight, |
| + base::TimeDelta animation_duration, |
| + bool explode); |
| + |
| + // Returns true if this ink drop is showing an effect for hovered or focused. |
|
bruthig
2016/05/26 00:40:52
Can you rephrase this to be clear that this is the
Evan Stade
2016/05/26 18:45:01
Done.
|
| + bool ShouldHighlight() const; |
| // Starts the |hover_after_ripple_timer_| timer. This will stop the current |
| // |hover_after_ripple_timer_| instance if it exists. |
| @@ -126,6 +130,10 @@ class VIEWS_EXPORT InkDropImpl : public InkDrop, |
| // SetHovered() function. |
| bool is_hovered_; |
| + // Tracks the logical focused state of |this| as manipulated by the public |
| + // SetFocused() function. |
| + bool is_focused_; |
| + |
| // The current InkDropRipple. Created on demand using CreateInkDropRipple(). |
| std::unique_ptr<InkDropRipple> ink_drop_ripple_; |