#ifndef UI_GFX_ANIMATION_TEST_ANIMATION_DELEGATE_H_
#define UI_GFX_ANIMATION_TEST_ANIMATION_DELEGATE_H_
#include "base/message_loop/message_loop.h"
#include "ui/gfx/animation/animation_delegate.h"
namespace gfx {
class TestAnimationDelegate : public AnimationDelegate {
public:
TestAnimationDelegate() : canceled_(false), finished_(false) {
}
virtual void AnimationEnded(const Animation* animation) {
finished_ = true;
base::MessageLoop::current()->Quit();
}
virtual void AnimationCanceled(const Animation* animation) {
finished_ = true;
canceled_ = true;
base::MessageLoop::current()->Quit();
}
bool finished() const {
return finished_;
}
bool canceled() const {
return canceled_;
}
private:
bool canceled_;
bool finished_;
DISALLOW_COPY_AND_ASSIGN(TestAnimationDelegate);
};
}
#endif