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

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

Issue 1587283002: Switch cc to std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unordered-map
Patch Set: Fix MSVC build issue Created 4 years, 11 months 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
« no previous file with comments | « no previous file | cc/animation/animation_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_HOST_H_ 5 #ifndef CC_ANIMATION_ANIMATION_HOST_H_
6 #define CC_ANIMATION_ANIMATION_HOST_H_ 6 #define CC_ANIMATION_ANIMATION_HOST_H_
7 7
8 #include <unordered_map>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/containers/scoped_ptr_hash_map.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "cc/animation/animation.h" 15 #include "cc/animation/animation.h"
16 #include "cc/base/cc_export.h" 16 #include "cc/base/cc_export.h"
17 #include "cc/trees/mutator_host_client.h" 17 #include "cc/trees/mutator_host_client.h"
18 #include "ui/gfx/geometry/box_f.h" 18 #include "ui/gfx/geometry/box_f.h"
19 #include "ui/gfx/geometry/vector2d_f.h" 19 #include "ui/gfx/geometry/vector2d_f.h"
20 20
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 void PushTimelinesToImplThread(AnimationHost* host_impl) const; 160 void PushTimelinesToImplThread(AnimationHost* host_impl) const;
161 void RemoveTimelinesFromImplThread(AnimationHost* host_impl) const; 161 void RemoveTimelinesFromImplThread(AnimationHost* host_impl) const;
162 void PushPropertiesToImplThread(AnimationHost* host_impl); 162 void PushPropertiesToImplThread(AnimationHost* host_impl);
163 163
164 void EraseTimelines(AnimationTimelineList::iterator begin, 164 void EraseTimelines(AnimationTimelineList::iterator begin,
165 AnimationTimelineList::iterator end); 165 AnimationTimelineList::iterator end);
166 166
167 // TODO(loyso): For now AnimationPlayers share LayerAnimationController object 167 // TODO(loyso): For now AnimationPlayers share LayerAnimationController object
168 // if they are attached to the same element(layer). Note that Element can 168 // if they are attached to the same element(layer). Note that Element can
169 // contain many Layers. 169 // contain many Layers.
170 typedef base::ScopedPtrHashMap<int, scoped_ptr<ElementAnimations>> 170 using LayerToElementAnimationsMap =
171 LayerToElementAnimationsMap; 171 std::unordered_map<int, scoped_ptr<ElementAnimations>>;
172 LayerToElementAnimationsMap layer_to_element_animations_map_; 172 LayerToElementAnimationsMap layer_to_element_animations_map_;
173 173
174 AnimationTimelineList timelines_; 174 AnimationTimelineList timelines_;
175 scoped_ptr<AnimationRegistrar> animation_registrar_; 175 scoped_ptr<AnimationRegistrar> animation_registrar_;
176 MutatorHostClient* mutator_host_client_; 176 MutatorHostClient* mutator_host_client_;
177 177
178 class ScrollOffsetAnimations; 178 class ScrollOffsetAnimations;
179 scoped_ptr<ScrollOffsetAnimations> scroll_offset_animations_; 179 scoped_ptr<ScrollOffsetAnimations> scroll_offset_animations_;
180 180
181 const ThreadInstance thread_instance_; 181 const ThreadInstance thread_instance_;
182 182
183 DISALLOW_COPY_AND_ASSIGN(AnimationHost); 183 DISALLOW_COPY_AND_ASSIGN(AnimationHost);
184 }; 184 };
185 185
186 } // namespace cc 186 } // namespace cc
187 187
188 #endif // CC_ANIMATION_ANIMATION_HOST_H_ 188 #endif // CC_ANIMATION_ANIMATION_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | cc/animation/animation_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698