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

Unified Diff: ui/base/animation/throb_animation.h

Issue 23531053: ui/base/animation -> ui/gfx/animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 2 trunk Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/animation/test_animation_delegate.h ('k') | ui/base/animation/throb_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/animation/throb_animation.h
diff --git a/ui/base/animation/throb_animation.h b/ui/base/animation/throb_animation.h
deleted file mode 100644
index 4292eee81f166a557c6ca7b8b73909120bbe8f59..0000000000000000000000000000000000000000
--- a/ui/base/animation/throb_animation.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2012 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 UI_BASE_ANIMATION_THROB_ANIMATION_H_
-#define UI_BASE_ANIMATION_THROB_ANIMATION_H_
-
-#include "ui/base/animation/slide_animation.h"
-
-namespace ui {
-
-// A subclass of SlideAnimation that can continually slide. All of the Animation
-// methods behave like that of SlideAnimation: transition to the next state.
-// The StartThrobbing method causes the ThrobAnimation to cycle between hidden
-// and shown for a set number of cycles.
-//
-// A ThrobAnimation has two durations: the duration used when behavior like
-// a SlideAnimation, and the duration used when throbbing.
-class UI_EXPORT ThrobAnimation : public SlideAnimation {
- public:
- explicit ThrobAnimation(AnimationDelegate* target);
- virtual ~ThrobAnimation() {}
-
- // Starts throbbing. cycles_til_stop gives the number of cycles to do before
- // stopping. A negative value means "throb indefinitely".
- void StartThrobbing(int cycles_til_stop);
-
- // Sets the duration of the slide animation when throbbing.
- void SetThrobDuration(int duration) { throb_duration_ = duration; }
-
- // Overridden to reset to the slide duration.
- virtual void Reset() OVERRIDE;
- virtual void Reset(double value) OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
-
- // Overridden to maintain the slide duration.
- virtual void SetSlideDuration(int duration) OVERRIDE;
-
- // The number of cycles remaining until the animation stops.
- void set_cycles_remaining(int value) { cycles_remaining_ = value; }
- int cycles_remaining() const { return cycles_remaining_; }
-
- protected:
- // Overriden to continually throb (assuming we're throbbing).
- virtual void Step(base::TimeTicks time_now) OVERRIDE;
-
- private:
- // Resets state such that we behave like SlideAnimation.
- void ResetForSlide();
-
- // Duration of the slide animation.
- int slide_duration_;
-
- // Duration of the slide animation when throbbing.
- int throb_duration_;
-
- // If throbbing, this is the number of cycles left.
- int cycles_remaining_;
-
- // Are we throbbing?
- bool throbbing_;
-
- DISALLOW_COPY_AND_ASSIGN(ThrobAnimation);
-};
-
-} // namespace ui
-
-#endif // UI_BASE_ANIMATION_THROB_ANIMATION_H_
« no previous file with comments | « ui/base/animation/test_animation_delegate.h ('k') | ui/base/animation/throb_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698