Index: ash/common/wm/background_animator.cc |
diff --git a/ash/common/wm/background_animator.cc b/ash/common/wm/background_animator.cc |
index b8596fb2760f91933d828cadf0c51269cc526e56..ed13bbba6c9001758c3e25fe7fcadc87da7d41ef 100644 |
--- a/ash/common/wm/background_animator.cc |
+++ b/ash/common/wm/background_animator.cc |
@@ -29,6 +29,10 @@ void BackgroundAnimator::SetDuration(int time_in_ms) { |
animation_.SetSlideDuration(time_in_ms); |
} |
+void BackgroundAnimator::Stop() { |
+ animation_.Stop(); |
+} |
+ |
void BackgroundAnimator::SetPaintsBackground( |
bool value, |
BackgroundAnimatorChangeType type) { |
@@ -38,6 +42,7 @@ void BackgroundAnimator::SetPaintsBackground( |
if (type == BACKGROUND_CHANGE_IMMEDIATE && !animation_.is_animating()) { |
animation_.Reset(value ? 1.0f : 0.0f); |
AnimationProgressed(&animation_); |
+ AnimationEnded(&animation_); |
return; |
} |
if (paints_background_) |
@@ -51,7 +56,11 @@ void BackgroundAnimator::AnimationProgressed(const gfx::Animation* animation) { |
if (alpha_ == alpha) |
return; |
alpha_ = alpha; |
- delegate_->UpdateBackground(alpha_); |
+ delegate_->UpdateBackground(this, alpha_); |
+} |
+ |
+void BackgroundAnimator::AnimationEnded(const gfx::Animation* animation) { |
+ delegate_->BackgroundAnimationEnded(this); |
} |
} // namespace ash |