| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 private: | 202 private: |
| 203 friend class base::RefCounted<LayerAnimator>; | 203 friend class base::RefCounted<LayerAnimator>; |
| 204 friend class ScopedLayerAnimationSettings; | 204 friend class ScopedLayerAnimationSettings; |
| 205 friend class LayerAnimatorTestController; | 205 friend class LayerAnimatorTestController; |
| 206 | 206 |
| 207 class RunningAnimation { | 207 class RunningAnimation { |
| 208 public: | 208 public: |
| 209 RunningAnimation(const base::WeakPtr<LayerAnimationSequence>& sequence); | 209 RunningAnimation(const base::WeakPtr<LayerAnimationSequence>& sequence); |
| 210 ~RunningAnimation(); | 210 ~RunningAnimation(); |
| 211 | 211 |
| 212 bool is_sequence_alive() const { return !!sequence_; } | 212 bool is_sequence_alive() const { return !!sequence_.get(); } |
| 213 LayerAnimationSequence* sequence() const { return sequence_.get(); } | 213 LayerAnimationSequence* sequence() const { return sequence_.get(); } |
| 214 | 214 |
| 215 private: | 215 private: |
| 216 base::WeakPtr<LayerAnimationSequence> sequence_; | 216 base::WeakPtr<LayerAnimationSequence> sequence_; |
| 217 | 217 |
| 218 // Copy and assign are allowed. | 218 // Copy and assign are allowed. |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 typedef std::vector<RunningAnimation> RunningAnimations; | 221 typedef std::vector<RunningAnimation> RunningAnimations; |
| 222 typedef std::deque<linked_ptr<LayerAnimationSequence> > AnimationQueue; | 222 typedef std::deque<linked_ptr<LayerAnimationSequence> > AnimationQueue; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 // Observers are notified when layer animations end, are scheduled or are | 339 // Observers are notified when layer animations end, are scheduled or are |
| 340 // aborted. | 340 // aborted. |
| 341 ObserverList<LayerAnimationObserver> observers_; | 341 ObserverList<LayerAnimationObserver> observers_; |
| 342 | 342 |
| 343 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); | 343 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); |
| 344 }; | 344 }; |
| 345 | 345 |
| 346 } // namespace ui | 346 } // namespace ui |
| 347 | 347 |
| 348 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ | 348 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ |
| OLD | NEW |