Index: ui/views/animation/ink_drop.h |
diff --git a/ui/views/animation/ink_drop.h b/ui/views/animation/ink_drop.h |
index 0eb419e11105867f8c25447dee516146f55fd213..ba0d88356fa73e93495fa8246b7e3b5382656c55 100644 |
--- a/ui/views/animation/ink_drop.h |
+++ b/ui/views/animation/ink_drop.h |
@@ -19,11 +19,13 @@ |
namespace views { |
+class InkDropObserver; |
+ |
// Pure virtual base class that manages the lifetime and state of an ink drop |
bruthig
2017/04/21 15:05:10
Can you update the docs? This is no longer a pure
spqchan
2017/04/27 21:40:06
Done.
|
// ripple as well as visual hover state feedback. |
class VIEWS_EXPORT InkDrop { |
public: |
- virtual ~InkDrop() {} |
+ virtual ~InkDrop(); |
// Called by ink drop hosts when their size is changed. |
virtual void HostSizeChanged(const gfx::Size& new_size) = 0; |
@@ -46,10 +48,24 @@ class VIEWS_EXPORT InkDrop { |
// Enables or disables the focus state. |
virtual void SetFocused(bool is_focused) = 0; |
+ // Returns true if the highlight animation is in the process of fading in or |
+ // is visible. |
+ virtual bool IsHighlightFadingInOrVisible() const = 0; |
+ |
+ // Methods to add/remove observers for this object. |
+ void AddObserver(InkDropObserver* observer); |
+ void RemoveObserver(InkDropObserver* observer); |
+ |
protected: |
- InkDrop() {} |
+ InkDrop(); |
+ |
+ const base::ObserverList<InkDropObserver>* observers() const { |
+ return &observers_; |
+ } |
private: |
+ base::ObserverList<InkDropObserver> observers_; |
+ |
DISALLOW_COPY_AND_ASSIGN(InkDrop); |
}; |