Index: ash/common/wm/background_animator.h |
diff --git a/ash/common/wm/background_animator.h b/ash/common/wm/background_animator.h |
index 83a1f8c43df55a49f6156ce22c011566cc14c5e9..07d1cfd56e450599b68d4ba9638320127d760d2e 100644 |
--- a/ash/common/wm/background_animator.h |
+++ b/ash/common/wm/background_animator.h |
@@ -9,6 +9,7 @@ |
#include "base/macros.h" |
#include "ui/gfx/animation/animation_delegate.h" |
#include "ui/gfx/animation/slide_animation.h" |
+#include "ui/gfx/animation/tween.h" |
James Cook
2016/06/14 17:50:02
do you need this?
bruthig
2016/07/26 19:50:02
Whoops, removed.
|
namespace ash { |
@@ -18,10 +19,15 @@ enum BackgroundAnimatorChangeType { |
BACKGROUND_CHANGE_IMMEDIATE |
}; |
+class BackgroundAnimator; |
+ |
// Delegate is notified any time the background changes. |
class ASH_EXPORT BackgroundAnimatorDelegate { |
public: |
- virtual void UpdateBackground(int alpha) = 0; |
+ virtual void UpdateBackground(BackgroundAnimator* animator, int alpha) = 0; |
+ |
+ virtual void BackgroundAnimationEnded(BackgroundAnimator* animator, |
James Cook
2016/06/14 17:50:02
optional: Consider making this Ended vs. Canceled
bruthig
2016/07/26 19:50:02
Canceled isn't actually needed so it has been remo
|
+ bool successful) = 0; |
protected: |
virtual ~BackgroundAnimatorDelegate() {} |
@@ -38,6 +44,9 @@ class ASH_EXPORT BackgroundAnimator : public gfx::AnimationDelegate { |
// Sets the transition time in ms. |
void SetDuration(int time_in_ms); |
+ // Stops the animation. Does nothing if the animation is not running. |
+ void Stop(); |
+ |
// Sets whether a background is rendered. Initial value is false. If |type| |
// is |CHANGE_IMMEDIATE| and an animation is not in progress this notifies |
// the delegate immediately (synchronously from this method). |
@@ -49,6 +58,8 @@ class ASH_EXPORT BackgroundAnimator : public gfx::AnimationDelegate { |
// gfx::AnimationDelegate overrides: |
void AnimationProgressed(const gfx::Animation* animation) override; |
+ void AnimationEnded(const gfx::Animation* animation) override; |
+ void AnimationCanceled(const gfx::Animation* animation) override; |
private: |
BackgroundAnimatorDelegate* delegate_; |