diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-01 23:20:52 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-01 23:20:52 +0000 |
commit | 059e7a559572484fb677480ef6b95322cde3b34f (patch) | |
tree | d21b6b7393c4d27d1fb2ee172c2a0ac7330138ae /app/test_animation_delegate.h | |
parent | e3f4cc62db9c967b911b00399674e392c71d0a7d (diff) | |
download | chromium_src-059e7a559572484fb677480ef6b95322cde3b34f.zip chromium_src-059e7a559572484fb677480ef6b95322cde3b34f.tar.gz chromium_src-059e7a559572484fb677480ef6b95322cde3b34f.tar.bz2 |
Adds AnimationContainer, which can be used to group a set of
animations to have the same timer. By default each animation has one
animationcontainer, but I'm going to change the tab renderer to share
the animationcontainer so that the pulse effects happen in unison.
Also updated the BoundsAnimator so that I can use it by the TabStrip.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1575011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/test_animation_delegate.h')
-rw-r--r-- | app/test_animation_delegate.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/app/test_animation_delegate.h b/app/test_animation_delegate.h new file mode 100644 index 0000000..76f0f3e --- /dev/null +++ b/app/test_animation_delegate.h @@ -0,0 +1,47 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef APP_TEST_ANIMATION_DELEGATE_H_ +#define APP_TEST_ANIMATION_DELEGATE_H_ + +#include "app/animation.h" +#include "base/message_loop.h" + +// Trivial AnimationDelegate implementation. AnimationEnded/Canceled quit the +// message loop. +class TestAnimationDelegate : public AnimationDelegate { + public: + TestAnimationDelegate() : canceled_(false), finished_(false) { + } + + virtual void AnimationStarted(const Animation* animation) { + } + + virtual void AnimationEnded(const Animation* animation) { + finished_ = true; + MessageLoop::current()->Quit(); + } + + virtual void AnimationCanceled(const Animation* animation) { + finished_ = true; + canceled_ = true; + MessageLoop::current()->Quit(); + } + + bool finished() const { + return finished_; + } + + bool canceled() const { + return canceled_; + } + + private: + bool canceled_; + bool finished_; + + DISALLOW_COPY_AND_ASSIGN(TestAnimationDelegate); +}; + +#endif // APP_TEST_ANIMATION_DELEGATE_H_ |