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

Unified Diff: ui/compositor/layer_animation_sequence.h

Issue 11316315: Remove ui::LayerAnimationSequence::duration and ui::LayerAnimationElement::duration. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make unit tests use IsFinished() instead of duration() Created 8 years 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/compositor/layer_animation_element_unittest.cc ('k') | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animation_sequence.h
diff --git a/ui/compositor/layer_animation_sequence.h b/ui/compositor/layer_animation_sequence.h
index b05db20a6149ac14d7dbde8e570db412d066fbf8..dcf5b63d4ef3af56dfad848c9c3e24d07fc77906 100644
--- a/ui/compositor/layer_animation_sequence.h
+++ b/ui/compositor/layer_animation_sequence.h
@@ -41,12 +41,18 @@ class COMPOSITOR_EXPORT LayerAnimationSequence
explicit LayerAnimationSequence(LayerAnimationElement* element);
virtual ~LayerAnimationSequence();
- // Updates the delegate to the appropriate value for |elapsed|, which is in
- // the range [0, Duration()]. If the animation is not aborted, it is
- // guaranteed that Animate will be called with elapsed = Duration(). Requests
- // a redraw if it is required.
+ // Updates the delegate to the appropriate value for |elapsed|. Requests a
+ // redraw if it is required.
void Progress(base::TimeDelta elapsed, LayerAnimationDelegate* delegate);
+ // Returns true if calling Progress now, with the given elapsed time, will
+ // finish the animation.
+ bool IsFinished(base::TimeDelta elapsed);
+
+ // Updates the delegate to the end of the animation; if this sequence is
+ // cyclic, updates the delegate to the end of one cycle of the sequence.
+ void ProgressToEnd(LayerAnimationDelegate* delegate);
+
// Sets the target value to the value that would have been set had
// the sequence completed. Does nothing if the sequence is cyclic.
void GetTargetValue(LayerAnimationElement::TargetValue* target) const;
@@ -59,11 +65,6 @@ class COMPOSITOR_EXPORT LayerAnimationSequence
return properties_;
}
- // The total, finite duration of one cycle of the sequence.
- base::TimeDelta duration() const {
- return duration_;
- }
-
// Adds an element to the sequence. The sequences takes ownership of this
// element.
void AddElement(LayerAnimationElement* element);
@@ -103,9 +104,6 @@ class COMPOSITOR_EXPORT LayerAnimationSequence
// Notifies the observers that this sequence has been aborted.
void NotifyAborted();
- // The sum of the durations of all the elements in the sequence.
- base::TimeDelta duration_;
-
// The union of all the properties modified by all elements in the sequence.
LayerAnimationElement::AnimatableProperties properties_;
« no previous file with comments | « ui/compositor/layer_animation_element_unittest.cc ('k') | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698