Removed unused icon resources from app_list.
[chromium-blink-merge.git] / ui / gfx / animation / test_animation_delegate.h
blob5bf6ea0a43b00225e0e8997199078770851b65f4
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.
5 #ifndef UI_GFX_ANIMATION_TEST_ANIMATION_DELEGATE_H_
6 #define UI_GFX_ANIMATION_TEST_ANIMATION_DELEGATE_H_
8 #include "base/message_loop/message_loop.h"
9 #include "ui/gfx/animation/animation_delegate.h"
11 namespace gfx {
13 // Trivial AnimationDelegate implementation. AnimationEnded/Canceled quit the
14 // message loop.
15 class TestAnimationDelegate : public AnimationDelegate {
16 public:
17 TestAnimationDelegate() : canceled_(false), finished_(false) {
20 virtual void AnimationEnded(const Animation* animation) {
21 finished_ = true;
22 base::MessageLoop::current()->Quit();
25 virtual void AnimationCanceled(const Animation* animation) {
26 finished_ = true;
27 canceled_ = true;
28 base::MessageLoop::current()->Quit();
31 bool finished() const {
32 return finished_;
35 bool canceled() const {
36 return canceled_;
39 private:
40 bool canceled_;
41 bool finished_;
43 DISALLOW_COPY_AND_ASSIGN(TestAnimationDelegate);
46 } // namespace gfx
48 #endif // UI_GFX_ANIMATION_TEST_ANIMATION_DELEGATE_H_