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