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_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ | 5 #ifndef CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ |
6 #define CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ | 6 #define CC_ANIMATION_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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 enum UpdateActivationType { | 145 enum UpdateActivationType { |
146 NormalActivation, | 146 NormalActivation, |
147 ForceActivation | 147 ForceActivation |
148 }; | 148 }; |
149 void UpdateActivation(UpdateActivationType type); | 149 void UpdateActivation(UpdateActivationType type); |
150 | 150 |
151 void NotifyObserversOpacityAnimated(float opacity); | 151 void NotifyObserversOpacityAnimated(float opacity); |
152 void NotifyObserversTransformAnimated(const gfx::Transform& transform); | 152 void NotifyObserversTransformAnimated(const gfx::Transform& transform); |
153 | 153 |
| 154 bool HasValueObserver(); |
154 bool HasActiveValueObserver(); | 155 bool HasActiveValueObserver(); |
155 | 156 |
156 // If this is true, we force a sync to the impl thread. | 157 // If this is true, we force a sync to the impl thread. |
157 bool force_sync_; | 158 bool force_sync_; |
158 | 159 |
159 AnimationRegistrar* registrar_; | 160 AnimationRegistrar* registrar_; |
160 int id_; | 161 int id_; |
161 ScopedPtrVector<Animation> active_animations_; | 162 ScopedPtrVector<Animation> active_animations_; |
162 | 163 |
163 // This is used to ensure that we don't spam the registrar. | 164 // This is used to ensure that we don't spam the registrar. |
164 bool is_active_; | 165 bool is_active_; |
165 | 166 |
166 double last_tick_time_; | 167 double last_tick_time_; |
167 | 168 |
168 ObserverList<LayerAnimationValueObserver> value_observers_; | 169 ObserverList<LayerAnimationValueObserver> value_observers_; |
169 ObserverList<LayerAnimationEventObserver> event_observers_; | 170 ObserverList<LayerAnimationEventObserver> event_observers_; |
170 | 171 |
171 WebKit::WebAnimationDelegate* layer_animation_delegate_; | 172 WebKit::WebAnimationDelegate* layer_animation_delegate_; |
172 | 173 |
173 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); | 174 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); |
174 }; | 175 }; |
175 | 176 |
176 } // namespace cc | 177 } // namespace cc |
177 | 178 |
178 #endif // CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ | 179 #endif // CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ |
OLD | NEW |