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

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

Issue 2447523002: [ash-md] Added different highlighting modes to the InkDropImpl. (Closed)
Patch Set: Fixed InkDropHostView::GetInkDrop() to use CreateInkDrop(). Created 4 years, 1 month 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/animation/flood_fill_ink_drop_ripple.cc ('k') | ui/views/animation/ink_drop_host_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_host.h
diff --git a/ui/views/animation/ink_drop_host.h b/ui/views/animation/ink_drop_host.h
index d6b39bf2344efd6e27223ad15265f2704ab49554..fa77f3ede4b8155ca3c16be9f6599f514844f69d 100644
--- a/ui/views/animation/ink_drop_host.h
+++ b/ui/views/animation/ink_drop_host.h
@@ -17,6 +17,7 @@ class Layer;
namespace views {
+class InkDrop;
class InkDropRipple;
class InkDropHighlight;
@@ -38,10 +39,21 @@ class VIEWS_EXPORT InkDropHost {
// Removes |ink_drop_layer| from the layer tree.
virtual void RemoveInkDropLayer(ui::Layer* ink_drop_layer) = 0;
- // Creates and returns the effect used for press.
+ // Returns a configured InkDrop. In general subclasses will return an
+ // InkDropImpl instance that will use the CreateInkDropRipple() and
+ // CreateInkDropHighlight() methods to create the visual effects.
+ //
+ // Subclasses should override this if they need to configure any properties
+ // specific to the InkDrop instance. e.g. the AutoHighlightMode of an
+ // InkDropImpl instance.
+ virtual std::unique_ptr<InkDrop> CreateInkDrop() = 0;
+
+ // Creates and returns the visual effect used for press. Used by InkDropImpl
+ // instances.
virtual std::unique_ptr<InkDropRipple> CreateInkDropRipple() const = 0;
- // Creates and returns the effect used for hover and focus.
+ // Creates and returns the visual effect used for hover and focus. Used by
+ // InkDropImpl instances.
virtual std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const = 0;
private:
« no previous file with comments | « ui/views/animation/flood_fill_ink_drop_ripple.cc ('k') | ui/views/animation/ink_drop_host_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698