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

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

Issue 2250783002: Allow InkDropRipple to co-exist with highlight (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl try Created 4 years, 4 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
Index: ui/views/animation/ink_drop_ripple.h
diff --git a/ui/views/animation/ink_drop_ripple.h b/ui/views/animation/ink_drop_ripple.h
index efc4972e9040992c7def572186e7d42ca244ac17..5a60758e18c0c224736682606a5268a71ec90f28 100644
--- a/ui/views/animation/ink_drop_ripple.h
+++ b/ui/views/animation/ink_drop_ripple.h
@@ -57,7 +57,7 @@ class VIEWS_EXPORT InkDropRipple {
//
// NOTE: GetTargetInkDropState() should return the new |ink_drop_state| value
// to any observers being notified as a result of the call.
- void AnimateToState(InkDropState ink_drop_state);
+ virtual void AnimateToState(InkDropState ink_drop_state);
bruthig 2016/08/25 17:45:29 This was intended to be a non-virtual function tha
Evan Stade 2016/08/26 23:36:15 Generally speaking, extracting logic like this red
bruthig 2016/08/31 22:22:29 The InkDropRipple class defines a contract that gu
Evan Stade 2016/09/01 01:19:15 It's not really a choice, because AnimateStateChan
bruthig 2016/09/01 15:53:57 I would have to see this more concretely. The maj
Evan Stade 2016/09/07 23:46:19 updated. I don't think it's really a problem if a
bruthig 2016/09/08 15:56:04 Right, the layer won't leak memory but it will exi
Evan Stade 2016/09/08 19:17:31 I don't understand the motivation to do that. We'r
bruthig 2016/09/09 16:05:47 That is the current scenario. I am requesting tha
Evan Stade 2016/09/09 18:55:48 The memory footprint is negligible and it's not a
bruthig 2016/09/09 19:30:05 How about this, in the quick return you could invo
InkDropState target_ink_drop_state() const { return target_ink_drop_state_; }
@@ -72,13 +72,16 @@ class VIEWS_EXPORT InkDropRipple {
// as well as the transition to the ACTIVATED state.
virtual void SnapToActivated();
- // The root Layer that can be added in to a Layer tree.
+ // The root Layer that can be added in to a Layer tree. This may return null.
virtual ui::Layer* GetRootLayer() = 0;
// Returns true when the ripple is visible. This is different from checking if
// the ink_drop_state() == HIDDEN because the ripple may be visible while it
// animates to the target HIDDEN state.
- virtual bool IsVisible() const = 0;
+ bool IsVisible();
+
+ // Returns true if this ripple is mutually exclusive with InkDropHighlight.
+ virtual bool OverridesHighlight() const = 0;
// Returns a test api to access internals of this. Default implmentations
// should return nullptr and test specific subclasses can override to return

Powered by Google App Engine
This is Rietveld 408576698