Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: cc/animation/animation_player.h

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just the vector Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_ANIMATION_PLAYER_H_ 5 #ifndef CC_ANIMATION_ANIMATION_PLAYER_H_
6 #define CC_ANIMATION_ANIMATION_PLAYER_H_ 6 #define CC_ANIMATION_ANIMATION_PLAYER_H_
7 7
8 #include <vector>
9
8 #include "base/containers/linked_list.h" 10 #include "base/containers/linked_list.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/time/time.h" 12 #include "base/time/time.h"
11 #include "cc/animation/animation.h" 13 #include "cc/animation/animation.h"
12 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
13 #include "cc/base/scoped_ptr_vector.h"
14 15
15 namespace cc { 16 namespace cc {
16 17
17 class AnimationDelegate; 18 class AnimationDelegate;
18 class AnimationHost; 19 class AnimationHost;
19 class AnimationTimeline; 20 class AnimationTimeline;
20 class ElementAnimations; 21 class ElementAnimations;
21 class LayerAnimationController; 22 class LayerAnimationController;
22 enum class LayerTreeType; 23 enum class LayerTreeType;
23 24
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 88
88 void RegisterPlayer(); 89 void RegisterPlayer();
89 void UnregisterPlayer(); 90 void UnregisterPlayer();
90 91
91 void BindElementAnimations(); 92 void BindElementAnimations();
92 void UnbindElementAnimations(); 93 void UnbindElementAnimations();
93 94
94 // We accumulate added animations in animations_ container 95 // We accumulate added animations in animations_ container
95 // if element_animations_ is a nullptr. It allows us to add/remove animations 96 // if element_animations_ is a nullptr. It allows us to add/remove animations
96 // to non-attached AnimationPlayers. 97 // to non-attached AnimationPlayers.
97 typedef ScopedPtrVector<Animation> AnimationList; 98 typedef std::vector<scoped_ptr<Animation>> AnimationList;
danakj 2015/11/17 01:12:16 drop the typedef, just use the concrete type?
vmpstr 2015/11/17 23:26:23 Done.
98 AnimationList animations_; 99 AnimationList animations_;
99 100
100 AnimationHost* animation_host_; 101 AnimationHost* animation_host_;
101 AnimationTimeline* animation_timeline_; 102 AnimationTimeline* animation_timeline_;
102 // element_animations isn't null if player attached to an element (layer). 103 // element_animations isn't null if player attached to an element (layer).
103 ElementAnimations* element_animations_; 104 ElementAnimations* element_animations_;
104 AnimationDelegate* layer_animation_delegate_; 105 AnimationDelegate* layer_animation_delegate_;
105 106
106 int id_; 107 int id_;
107 int layer_id_; 108 int layer_id_;
108 109
109 DISALLOW_COPY_AND_ASSIGN(AnimationPlayer); 110 DISALLOW_COPY_AND_ASSIGN(AnimationPlayer);
110 }; 111 };
111 112
112 } // namespace cc 113 } // namespace cc
113 114
114 #endif // CC_ANIMATION_ANIMATION_PLAYER_H_ 115 #endif // CC_ANIMATION_ANIMATION_PLAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698