| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ELEMENT_ANIMATIONS_H_ | 5 #ifndef CC_ANIMATION_ELEMENT_ANIMATIONS_H_ |
| 6 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_ | 6 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_ |
| 7 | 7 |
| 8 #include <bitset> | 8 #include <bitset> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/containers/linked_list.h" | |
| 13 #include "base/macros.h" | 12 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/observer_list.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "cc/animation/animation.h" | 16 #include "cc/animation/animation.h" |
| 17 #include "cc/animation/animation_curve.h" | 17 #include "cc/animation/animation_curve.h" |
| 18 #include "cc/animation/animation_events.h" | 18 #include "cc/animation/animation_events.h" |
| 19 #include "cc/animation/target_property.h" | 19 #include "cc/animation/target_property.h" |
| 20 #include "cc/base/cc_export.h" | 20 #include "cc/base/cc_export.h" |
| 21 #include "ui/gfx/geometry/scroll_offset.h" | 21 #include "ui/gfx/geometry/scroll_offset.h" |
| 22 #include "ui/gfx/transform.h" | 22 #include "ui/gfx/transform.h" |
| 23 | 23 |
| 24 namespace gfx { | 24 namespace gfx { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 55 void InitAffectedElementTypes(); | 55 void InitAffectedElementTypes(); |
| 56 void ClearAffectedElementTypes(); | 56 void ClearAffectedElementTypes(); |
| 57 | 57 |
| 58 void ElementRegistered(ElementId element_id, ElementListType list_type); | 58 void ElementRegistered(ElementId element_id, ElementListType list_type); |
| 59 void ElementUnregistered(ElementId element_id, ElementListType list_type); | 59 void ElementUnregistered(ElementId element_id, ElementListType list_type); |
| 60 | 60 |
| 61 void AddPlayer(AnimationPlayer* player); | 61 void AddPlayer(AnimationPlayer* player); |
| 62 void RemovePlayer(AnimationPlayer* player); | 62 void RemovePlayer(AnimationPlayer* player); |
| 63 bool IsEmpty() const; | 63 bool IsEmpty() const; |
| 64 | 64 |
| 65 typedef base::LinkedList<AnimationPlayer> PlayersList; | 65 typedef base::ObserverList<AnimationPlayer> PlayersList; |
| 66 typedef base::LinkNode<AnimationPlayer> PlayersListNode; | 66 PlayersList& players_list() const { return *players_list_.get(); } |
| 67 const PlayersList& players_list() const { return *players_list_.get(); } | |
| 68 | 67 |
| 69 // Ensures that the list of active animations on the main thread and the impl | 68 // Ensures that the list of active animations on the main thread and the impl |
| 70 // thread are kept in sync. This function does not take ownership of the impl | 69 // thread are kept in sync. This function does not take ownership of the impl |
| 71 // thread ElementAnimations. | 70 // thread ElementAnimations. |
| 72 void PushPropertiesTo( | 71 void PushPropertiesTo( |
| 73 scoped_refptr<ElementAnimations> element_animations_impl); | 72 scoped_refptr<ElementAnimations> element_animations_impl); |
| 74 | 73 |
| 75 void AddAnimation(std::unique_ptr<Animation> animation); | 74 void AddAnimation(std::unique_ptr<Animation> animation); |
| 76 void PauseAnimation(int animation_id, base::TimeDelta time_offset); | 75 void PauseAnimation(int animation_id, base::TimeDelta time_offset); |
| 77 void RemoveAnimation(int animation_id); | 76 void RemoveAnimation(int animation_id); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 struct PropertyAnimationState filter_animation_state_; | 296 struct PropertyAnimationState filter_animation_state_; |
| 298 struct PropertyAnimationState opacity_animation_state_; | 297 struct PropertyAnimationState opacity_animation_state_; |
| 299 struct PropertyAnimationState transform_animation_state_; | 298 struct PropertyAnimationState transform_animation_state_; |
| 300 | 299 |
| 301 DISALLOW_COPY_AND_ASSIGN(ElementAnimations); | 300 DISALLOW_COPY_AND_ASSIGN(ElementAnimations); |
| 302 }; | 301 }; |
| 303 | 302 |
| 304 } // namespace cc | 303 } // namespace cc |
| 305 | 304 |
| 306 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_ | 305 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_ |
| OLD | NEW |