| Index: ui/views/animation/ink_drop_ripple.cc
|
| diff --git a/ui/views/animation/ink_drop_ripple.cc b/ui/views/animation/ink_drop_ripple.cc
|
| index 06e38439bbe145737f01b123ec89bfc7f3e6ac74..082e7576fa411e42e66868e297360b8ec5f8d32f 100644
|
| --- a/ui/views/animation/ink_drop_ripple.cc
|
| +++ b/ui/views/animation/ink_drop_ripple.cc
|
| @@ -31,6 +31,9 @@ InkDropRipple::InkDropRipple()
|
| InkDropRipple::~InkDropRipple() {}
|
|
|
| void InkDropRipple::AnimateToState(InkDropState ink_drop_state) {
|
| + if (!GetRootLayer())
|
| + return;
|
| +
|
| // Does not return early if |target_ink_drop_state_| == |ink_drop_state| for
|
| // two reasons.
|
| // 1. The attached observers must be notified of all animations started and
|
| @@ -68,6 +71,9 @@ void InkDropRipple::AnimateToState(InkDropState ink_drop_state) {
|
| }
|
|
|
| void InkDropRipple::SnapToActivated() {
|
| + if (!GetRootLayer())
|
| + return;
|
| +
|
| AbortAllAnimations();
|
| // |animation_observer| will be deleted when AnimationEndedCallback() returns
|
| // true.
|
| @@ -84,6 +90,10 @@ void InkDropRipple::SnapToActivated() {
|
| animation_observer->SetActive();
|
| }
|
|
|
| +bool InkDropRipple::IsVisible() {
|
| + return GetRootLayer() && GetRootLayer()->visible();
|
| +}
|
| +
|
| void InkDropRipple::HideImmediately() {
|
| AbortAllAnimations();
|
| SetStateToHidden();
|
|
|