OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ |
6 #define UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ | 6 #define UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // sequences. | 29 // sequences. |
30 class COMPOSITOR_EXPORT LayerAnimationSequence { | 30 class COMPOSITOR_EXPORT LayerAnimationSequence { |
31 public: | 31 public: |
32 LayerAnimationSequence(); | 32 LayerAnimationSequence(); |
33 // Takes ownership of the given element and adds it to the sequence. | 33 // Takes ownership of the given element and adds it to the sequence. |
34 explicit LayerAnimationSequence(LayerAnimationElement* element); | 34 explicit LayerAnimationSequence(LayerAnimationElement* element); |
35 virtual ~LayerAnimationSequence(); | 35 virtual ~LayerAnimationSequence(); |
36 | 36 |
37 // Updates the delegate to the appropriate value for |elapsed|, which is in | 37 // Updates the delegate to the appropriate value for |elapsed|, which is in |
38 // the range [0, Duration()]. If the animation is not aborted, it is | 38 // the range [0, Duration()]. If the animation is not aborted, it is |
39 // guaranteed that Animate will be called with elapsed = Duration(). Requests | 39 // guaranteed that Animate will be called with elapsed = Duration(). |
40 // a redraw if it is required. | 40 // Returns true if a redraw is required. |
41 void Progress(base::TimeDelta elapsed, LayerAnimationDelegate* delegate); | 41 bool Progress(base::TimeDelta elapsed, LayerAnimationDelegate* delegate); |
42 | 42 |
43 // Sets the target value to the value that would have been set had | 43 // Sets the target value to the value that would have been set had |
44 // the sequence completed. Does nothing if the sequence is cyclic. | 44 // the sequence completed. Does nothing if the sequence is cyclic. |
45 void GetTargetValue(LayerAnimationElement::TargetValue* target) const; | 45 void GetTargetValue(LayerAnimationElement::TargetValue* target) const; |
46 | 46 |
47 // Aborts the given animation. | 47 // Aborts the given animation. |
48 void Abort(); | 48 void Abort(); |
49 | 49 |
50 // All properties modified by the sequence. | 50 // All properties modified by the sequence. |
51 const LayerAnimationElement::AnimatableProperties& properties() const { | 51 const LayerAnimationElement::AnimatableProperties& properties() const { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // These parties are notified when layer animations end. | 115 // These parties are notified when layer animations end. |
116 ObserverList<LayerAnimationObserver> observers_; | 116 ObserverList<LayerAnimationObserver> observers_; |
117 | 117 |
118 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence); | 118 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence); |
119 }; | 119 }; |
120 | 120 |
121 } // namespace ui | 121 } // namespace ui |
122 | 122 |
123 #endif // UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ | 123 #endif // UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ |
OLD | NEW |