Chromium Code Reviews| 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_ANIMATOR_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATOR_H_ |
| 6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_ | 6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 // animation sequences. | 123 // animation sequences. |
| 124 void ScheduleTogether(const std::vector<LayerAnimationSequence*>& animations); | 124 void ScheduleTogether(const std::vector<LayerAnimationSequence*>& animations); |
| 125 | 125 |
| 126 // Schedules a pause for length |duration| of all the specified properties. | 126 // Schedules a pause for length |duration| of all the specified properties. |
| 127 // End the list with -1. | 127 // End the list with -1. |
| 128 void SchedulePauseForProperties( | 128 void SchedulePauseForProperties( |
| 129 base::TimeDelta duration, | 129 base::TimeDelta duration, |
| 130 LayerAnimationElement::AnimatableProperty property, | 130 LayerAnimationElement::AnimatableProperty property, |
| 131 ...); | 131 ...); |
| 132 | 132 |
| 133 // Schedules a pause with zero length of all the specified properties. | |
| 134 // End the list with -1. If animation is not cancelled, |callback| will be | |
| 135 // called. | |
| 136 void ScheduleSuccessCallbackForProperties( | |
|
Daniel Erat
2012/11/27 18:32:11
nit: "Schedule" doesn't make sense to me here, and
Denis Kuznetsov (DE-MUC)
2012/11/27 18:46:59
Done.
| |
| 137 base::Closure& callback, | |
| 138 LayerAnimationElement::AnimatableProperty property, | |
| 139 ...); | |
|
Daniel Erat
2012/11/27 18:32:11
nit: fix indenting
Denis Kuznetsov (DE-MUC)
2012/11/27 18:46:59
Done.
| |
| 140 | |
| 133 // Returns true if there is an animation in the queue (animations remain in | 141 // Returns true if there is an animation in the queue (animations remain in |
| 134 // the queue until they complete, so this includes running animations). | 142 // the queue until they complete, so this includes running animations). |
| 135 bool is_animating() const { return !animation_queue_.empty(); } | 143 bool is_animating() const { return !animation_queue_.empty(); } |
| 136 | 144 |
| 137 // Returns true if there is an animation in the queue that animates the given | 145 // Returns true if there is an animation in the queue that animates the given |
| 138 // property (animations remain in the queue until they complete, so this | 146 // property (animations remain in the queue until they complete, so this |
| 139 // includes running animations). | 147 // includes running animations). |
| 140 bool IsAnimatingProperty( | 148 bool IsAnimatingProperty( |
| 141 LayerAnimationElement::AnimatableProperty property) const; | 149 LayerAnimationElement::AnimatableProperty property) const; |
| 142 | 150 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 356 // Observers are notified when layer animations end, are scheduled or are | 364 // Observers are notified when layer animations end, are scheduled or are |
| 357 // aborted. | 365 // aborted. |
| 358 ObserverList<LayerAnimationObserver> observers_; | 366 ObserverList<LayerAnimationObserver> observers_; |
| 359 | 367 |
| 360 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); | 368 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); |
| 361 }; | 369 }; |
| 362 | 370 |
| 363 } // namespace ui | 371 } // namespace ui |
| 364 | 372 |
| 365 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ | 373 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ |
| OLD | NEW |