OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_GFX_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ | 5 #ifndef UI_GFX_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ |
6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ | 6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 LayerAnimationSequence(); | 30 LayerAnimationSequence(); |
31 // Takes ownership of the given element and adds it to the sequence. | 31 // Takes ownership of the given element and adds it to the sequence. |
32 explicit LayerAnimationSequence(LayerAnimationElement* element); | 32 explicit LayerAnimationSequence(LayerAnimationElement* element); |
33 virtual ~LayerAnimationSequence(); | 33 virtual ~LayerAnimationSequence(); |
34 | 34 |
35 // Updates the delegate to the appropriate value for |elapsed|, which is in | 35 // Updates the delegate to the appropriate value for |elapsed|, which is in |
36 // the range [0, Duration()]. If the animation is not aborted, it is | 36 // the range [0, Duration()]. If the animation is not aborted, it is |
37 // guaranteed that Animate will be called with elapsed = Duration(). | 37 // guaranteed that Animate will be called with elapsed = Duration(). |
38 void Progress(base::TimeDelta elapsed, LayerAnimationDelegate* delegate); | 38 void Progress(base::TimeDelta elapsed, LayerAnimationDelegate* delegate); |
39 | 39 |
| 40 // Sets the target value to the value that would have been set had |
| 41 // the sequence completed. Does nothing if the sequence is cyclic. |
| 42 void GetTargetValue(LayerAnimationElement::TargetValue* target) const; |
| 43 |
40 // Aborts the given animation. | 44 // Aborts the given animation. |
41 void Abort(); | 45 void Abort(); |
42 | 46 |
43 // All properties modified by the sequence. | 47 // All properties modified by the sequence. |
44 const LayerAnimationElement::AnimatableProperties& properties() const { | 48 const LayerAnimationElement::AnimatableProperties& properties() const { |
45 return properties_; | 49 return properties_; |
46 } | 50 } |
47 | 51 |
48 // The total, finite duration of one cycle of the sequence. | 52 // The total, finite duration of one cycle of the sequence. |
49 base::TimeDelta duration() const { | 53 base::TimeDelta duration() const { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // These are used when animating to efficiently find the next element. | 85 // These are used when animating to efficiently find the next element. |
82 size_t last_element_; | 86 size_t last_element_; |
83 base::TimeDelta last_start_; | 87 base::TimeDelta last_start_; |
84 | 88 |
85 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence); | 89 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence); |
86 }; | 90 }; |
87 | 91 |
88 } // namespace ui | 92 } // namespace ui |
89 | 93 |
90 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ | 94 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ |
OLD | NEW |