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

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

Issue 2615613003: Fix double ripple on activated flood fill ripple (Closed)
Patch Set: Addressed nits Created 3 years, 11 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/animation/ink_drop_highlight_unittest.cc ('k') | ui/views/animation/ink_drop_ripple_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0794be64898bb0855b94f7ce5b88e14db9874669..22306a933a9aab4b1eb0b97da191745d9b8f89ea 100644
--- a/ui/views/animation/ink_drop_ripple.cc
+++ b/ui/views/animation/ink_drop_ripple.cc
@@ -103,7 +103,8 @@ test::InkDropRippleTestApi* InkDropRipple::GetTestApi() {
void InkDropRipple::AnimationStartedCallback(
InkDropState ink_drop_state,
const ui::CallbackLayerAnimationObserver& observer) {
- observer_->AnimationStarted(ink_drop_state);
+ if (observer_)
+ observer_->AnimationStarted(ink_drop_state);
}
bool InkDropRipple::AnimationEndedCallback(
@@ -111,10 +112,11 @@ bool InkDropRipple::AnimationEndedCallback(
const ui::CallbackLayerAnimationObserver& observer) {
if (ink_drop_state == InkDropState::HIDDEN)
SetStateToHidden();
- observer_->AnimationEnded(ink_drop_state,
- observer.aborted_count()
- ? InkDropAnimationEndedReason::PRE_EMPTED
- : InkDropAnimationEndedReason::SUCCESS);
+ if (observer_)
+ observer_->AnimationEnded(ink_drop_state,
+ observer.aborted_count()
+ ? InkDropAnimationEndedReason::PRE_EMPTED
+ : InkDropAnimationEndedReason::SUCCESS);
// |this| may be deleted!
return true;
}
« no previous file with comments | « ui/views/animation/ink_drop_highlight_unittest.cc ('k') | ui/views/animation/ink_drop_ripple_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698