| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CC_LAYER_ANIMATION_CONTROLLER_H_ | 5 #ifndef CC_LAYER_ANIMATION_CONTROLLER_H_ |
| 6 #define CC_LAYER_ANIMATION_CONTROLLER_H_ | 6 #define CC_LAYER_ANIMATION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 // This is called in response to an animation being started on the impl thre
ad. This | 72 // This is called in response to an animation being started on the impl thre
ad. This |
| 73 // function updates the corresponding main thread animation's start time. | 73 // function updates the corresponding main thread animation's start time. |
| 74 virtual void OnAnimationStarted(const AnimationEvent&) OVERRIDE; | 74 virtual void OnAnimationStarted(const AnimationEvent&) OVERRIDE; |
| 75 | 75 |
| 76 // If a sync is forced, then the next time animation updates are pushed to t
he impl | 76 // If a sync is forced, then the next time animation updates are pushed to t
he impl |
| 77 // thread, all animations will be transferred. | 77 // thread, all animations will be transferred. |
| 78 void setForceSync() { m_forceSync = true; } | 78 void setForceSync() { m_forceSync = true; } |
| 79 | 79 |
| 80 void setAnimationRegistrar(AnimationRegistrar*); | 80 void setAnimationRegistrar(AnimationRegistrar*); |
| 81 AnimationRegistrar* animationRegistrar() { return m_registrar; } |
| 81 | 82 |
| 82 void addObserver(LayerAnimationValueObserver*); | 83 void addObserver(LayerAnimationValueObserver*); |
| 83 void removeObserver(LayerAnimationValueObserver*); | 84 void removeObserver(LayerAnimationValueObserver*); |
| 84 | 85 |
| 85 protected: | 86 protected: |
| 86 friend class base::RefCounted<LayerAnimationController>; | 87 friend class base::RefCounted<LayerAnimationController>; |
| 87 | 88 |
| 88 LayerAnimationController(int id); | 89 LayerAnimationController(int id); |
| 89 virtual ~LayerAnimationController(); | 90 virtual ~LayerAnimationController(); |
| 90 | 91 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 double m_lastTickTime; | 128 double m_lastTickTime; |
| 128 | 129 |
| 129 ObserverList<LayerAnimationValueObserver> m_observers; | 130 ObserverList<LayerAnimationValueObserver> m_observers; |
| 130 | 131 |
| 131 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); | 132 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); |
| 132 }; | 133 }; |
| 133 | 134 |
| 134 } // namespace cc | 135 } // namespace cc |
| 135 | 136 |
| 136 #endif // CC_LAYER_ANIMATION_CONTROLLER_H_ | 137 #endif // CC_LAYER_ANIMATION_CONTROLLER_H_ |
| OLD | NEW |