Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: app/test_animation_delegate.h

Issue 1575011: Adds AnimationContainer, which can be used to group a set of (Closed)
Patch Set: Incorporated review feedback Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 APP_TEST_ANIMATION_DELEGATE_H_
6 #define APP_TEST_ANIMATION_DELEGATE_H_
7
8 #include "app/animation.h"
9 #include "base/message_loop.h"
10
11 // Trivial AnimationDelegate implementation. AnimationEnded/Canceled quit the
12 // message loop.
13 class TestAnimationDelegate : public AnimationDelegate {
14 public:
15 TestAnimationDelegate() : canceled_(false), finished_(false) {
16 }
17
18 virtual void AnimationStarted(const Animation* animation) {
19 }
20
21 virtual void AnimationEnded(const Animation* animation) {
22 finished_ = true;
23 MessageLoop::current()->Quit();
24 }
25
26 virtual void AnimationCanceled(const Animation* animation) {
27 finished_ = true;
28 canceled_ = true;
29 MessageLoop::current()->Quit();
30 }
31
32 bool finished() const {
33 return finished_;
34 }
35
36 bool canceled() const {
37 return canceled_;
38 }
39
40 private:
41 bool canceled_;
42 bool finished_;
43
44 DISALLOW_COPY_AND_ASSIGN(TestAnimationDelegate);
45 };
46
47 #endif // APP_TEST_ANIMATION_DELEGATE_H_
OLDNEW
« no previous file with comments | « app/slide_animation.h ('k') | app/throb_animation.h » ('j') | views/animation/bounds_animator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698