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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 public: | 39 public: |
40 enum class ObserverType { ACTIVE, PENDING }; | 40 enum class ObserverType { ACTIVE, PENDING }; |
41 | 41 |
42 static scoped_refptr<LayerAnimationController> Create(int id); | 42 static scoped_refptr<LayerAnimationController> Create(int id); |
43 | 43 |
44 int id() const { return id_; } | 44 int id() const { return id_; } |
45 | 45 |
46 void AddAnimation(scoped_ptr<Animation> animation); | 46 void AddAnimation(scoped_ptr<Animation> animation); |
47 void PauseAnimation(int animation_id, base::TimeDelta time_offset); | 47 void PauseAnimation(int animation_id, base::TimeDelta time_offset); |
48 void RemoveAnimation(int animation_id); | 48 void RemoveAnimation(int animation_id); |
49 void RemoveAnimation(int animation_id, | |
50 Animation::TargetProperty target_property); | |
51 void AbortAnimation(int animation_id); | 49 void AbortAnimation(int animation_id); |
52 void AbortAnimations(Animation::TargetProperty target_property); | 50 void AbortAnimations(Animation::TargetProperty target_property); |
53 | 51 |
54 // Ensures that the list of active animations on the main thread and the impl | 52 // Ensures that the list of active animations on the main thread and the impl |
55 // thread are kept in sync. This function does not take ownership of the impl | 53 // thread are kept in sync. This function does not take ownership of the impl |
56 // thread controller. This method is virtual for testing. | 54 // thread controller. This method is virtual for testing. |
57 virtual void PushAnimationUpdatesTo( | 55 virtual void PushAnimationUpdatesTo( |
58 LayerAnimationController* controller_impl); | 56 LayerAnimationController* controller_impl); |
59 | 57 |
60 void Animate(base::TimeTicks monotonic_time); | 58 void Animate(base::TimeTicks monotonic_time); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 247 |
250 bool potentially_animating_transform_for_active_observers_; | 248 bool potentially_animating_transform_for_active_observers_; |
251 bool potentially_animating_transform_for_pending_observers_; | 249 bool potentially_animating_transform_for_pending_observers_; |
252 | 250 |
253 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); | 251 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); |
254 }; | 252 }; |
255 | 253 |
256 } // namespace cc | 254 } // namespace cc |
257 | 255 |
258 #endif // CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ | 256 #endif // CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ |
OLD | NEW |