Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1298)

Unified Diff: ui/views/animation/ink_drop.h

Issue 2720183002: [Views] Update ink drop for omnibox icons (Closed)
Patch Set: Removed CanProcessEventsWithinSubtree Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/animation/ink_drop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5301d3537bf2114dc8ea65c276d2de499a29c12a 100644
--- a/ui/views/animation/ink_drop.h
+++ b/ui/views/animation/ink_drop.h
@@ -19,11 +19,13 @@
namespace views {
-// Pure virtual base class that manages the lifetime and state of an ink drop
-// ripple as well as visual hover state feedback.
+class InkDropObserver;
+
+// Base class that manages the lifetime and state of an ink drop 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,29 @@ 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;
+
+ // Enables or disables the highlight when the target is hovered.
+ virtual void SetShowHighlightOnHover(bool show_highlight_on_hover) = 0;
+
+ // Enables or disables the highlight when the target is focused.
+ virtual void SetShowHighlightOnFocus(bool show_highlight_on_focus) = 0;
+
+ // Methods to add/remove observers for this object.
+ void AddObserver(InkDropObserver* observer);
+ void RemoveObserver(InkDropObserver* observer);
+
protected:
- InkDrop() {}
+ InkDrop();
+
+ // Notifes all of the observers that the animation has started.
+ void NotifyInkDropAnimationStarted();
private:
+ base::ObserverList<InkDropObserver> observers_;
+
DISALLOW_COPY_AND_ASSIGN(InkDrop);
};
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/animation/ink_drop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698