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

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

Issue 10855151: Gradient overlay for constrained window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos Created 8 years, 4 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/animation_unittest.cc ('k') | ui/base/animation/linear_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/animation/linear_animation.h
diff --git a/ui/base/animation/linear_animation.h b/ui/base/animation/linear_animation.h
index 9f385d6dc9ceccb3c5eca9d4a8f11cd99fb4db50..33f978554468dcaa2667431ed49243663a441616 100644
--- a/ui/base/animation/linear_animation.h
+++ b/ui/base/animation/linear_animation.h
@@ -32,6 +32,9 @@ class UI_EXPORT LinearAnimation : public Animation {
// can override this to provide others.
virtual double GetCurrentValue() const OVERRIDE;
+ // Change the current state of the animation to |new_value|.
+ void SetCurrentValue(double new_value);
+
// Skip to the end of the current animation.
void End();
@@ -42,13 +45,16 @@ class UI_EXPORT LinearAnimation : public Animation {
protected:
// Called when the animation progresses. Subclasses override this to
// efficiently update their state.
- virtual void AnimateToState(double state) = 0;
+ virtual void AnimateToState(double state) {}
// Invoked by the AnimationContainer when the animation is running to advance
// the animation. Use |time_now| rather than Time::Now to avoid multiple
// animations running at the same time diverging.
virtual void Step(base::TimeTicks time_now) OVERRIDE;
+ // Overriden to initialize state.
+ virtual void AnimationStarted() OVERRIDE;
+
// Overriden to advance to the end (if End was invoked).
virtual void AnimationStopped() OVERRIDE;
« no previous file with comments | « ui/base/animation/animation_unittest.cc ('k') | ui/base/animation/linear_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698