Chromium Code Reviews| 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/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "cc/animation/animation_events.h" | 14 #include "cc/animation/animation_events.h" |
| 15 #include "cc/animation/layer_animation_event_observer.h" | 15 #include "cc/animation/layer_animation_event_observer.h" |
| 16 #include "cc/base/cc_export.h" | 16 #include "cc/base/cc_export.h" |
| 17 #include "cc/base/scoped_ptr_vector.h" | |
|
danakj
2015/11/17 01:12:16
include vector
| |
| 18 #include "ui/gfx/geometry/scroll_offset.h" | 17 #include "ui/gfx/geometry/scroll_offset.h" |
| 19 #include "ui/gfx/transform.h" | 18 #include "ui/gfx/transform.h" |
| 20 | 19 |
| 21 namespace gfx { | 20 namespace gfx { |
| 22 class BoxF; | 21 class BoxF; |
| 23 class Transform; | 22 class Transform; |
| 24 } | 23 } |
| 25 | 24 |
| 26 namespace cc { | 25 namespace cc { |
| 27 | 26 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 bool notify_active_observers, | 216 bool notify_active_observers, |
| 218 bool notify_pending_observers); | 217 bool notify_pending_observers); |
| 219 | 218 |
| 220 void UpdatePotentiallyAnimatingTransform(); | 219 void UpdatePotentiallyAnimatingTransform(); |
| 221 | 220 |
| 222 bool HasValueObserver(); | 221 bool HasValueObserver(); |
| 223 bool HasActiveValueObserver(); | 222 bool HasActiveValueObserver(); |
| 224 | 223 |
| 225 AnimationRegistrar* registrar_; | 224 AnimationRegistrar* registrar_; |
| 226 int id_; | 225 int id_; |
| 227 ScopedPtrVector<Animation> animations_; | 226 std::vector<scoped_ptr<Animation>> animations_; |
| 228 | 227 |
| 229 // This is used to ensure that we don't spam the registrar. | 228 // This is used to ensure that we don't spam the registrar. |
| 230 bool is_active_; | 229 bool is_active_; |
| 231 | 230 |
| 232 base::TimeTicks last_tick_time_; | 231 base::TimeTicks last_tick_time_; |
| 233 | 232 |
| 234 base::ObserverList<LayerAnimationValueObserver> value_observers_; | 233 base::ObserverList<LayerAnimationValueObserver> value_observers_; |
| 235 base::ObserverList<LayerAnimationEventObserver> event_observers_; | 234 base::ObserverList<LayerAnimationEventObserver> event_observers_; |
| 236 | 235 |
| 237 LayerAnimationValueProvider* value_provider_; | 236 LayerAnimationValueProvider* value_provider_; |
| 238 | 237 |
| 239 AnimationDelegate* layer_animation_delegate_; | 238 AnimationDelegate* layer_animation_delegate_; |
| 240 | 239 |
| 241 // Only try to start animations when new animations are added or when the | 240 // Only try to start animations when new animations are added or when the |
| 242 // previous attempt at starting animations failed to start all animations. | 241 // previous attempt at starting animations failed to start all animations. |
| 243 bool needs_to_start_animations_; | 242 bool needs_to_start_animations_; |
| 244 | 243 |
| 245 bool scroll_offset_animation_was_interrupted_; | 244 bool scroll_offset_animation_was_interrupted_; |
| 246 | 245 |
| 247 bool potentially_animating_transform_for_active_observers_; | 246 bool potentially_animating_transform_for_active_observers_; |
| 248 bool potentially_animating_transform_for_pending_observers_; | 247 bool potentially_animating_transform_for_pending_observers_; |
| 249 | 248 |
| 250 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); | 249 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); |
| 251 }; | 250 }; |
| 252 | 251 |
| 253 } // namespace cc | 252 } // namespace cc |
| 254 | 253 |
| 255 #endif // CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ | 254 #endif // CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ |
| OLD | NEW |