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_; |