1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef UI_GFX_ANIMATION_ANIMATION_DELEGATE_H_
6 #define UI_GFX_ANIMATION_ANIMATION_DELEGATE_H_
7 
8 #include "ui/gfx/animation/animation_export.h"
9 
10 namespace gfx {
11 
12 class Animation;
13 class AnimationContainer;
14 
15 // AnimationDelegate
16 //
17 //  Implement this interface when you want to receive notifications about the
18 //  state of an animation.
19 class ANIMATION_EXPORT AnimationDelegate {
20  public:
~AnimationDelegate()21   virtual ~AnimationDelegate() {}
22 
23   // Called when an animation has completed.
AnimationEnded(const Animation * animation)24   virtual void AnimationEnded(const Animation* animation) {}
25 
26   // Called when an animation has progressed.
AnimationProgressed(const Animation * animation)27   virtual void AnimationProgressed(const Animation* animation) {}
28 
29   // Called when an animation has been canceled.
AnimationCanceled(const Animation * animation)30   virtual void AnimationCanceled(const Animation* animation) {}
31 
32   // Called when an animation container has been set. This gives a chance to
33   // set a custom animation runner.
AnimationContainerWasSet(AnimationContainer * container)34   virtual void AnimationContainerWasSet(AnimationContainer* container) {}
35 };
36 
37 }  // namespace gfx
38 
39 #endif  // UI_GFX_ANIMATION_ANIMATION_DELEGATE_H_
40