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

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

Issue 1587283002: Switch cc to std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unordered-map
Patch Set: 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
OLDNEW
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_ANIMATION_REGISTRAR_H_ 5 #ifndef CC_ANIMATION_ANIMATION_REGISTRAR_H_
6 #define CC_ANIMATION_ANIMATION_REGISTRAR_H_ 6 #define CC_ANIMATION_ANIMATION_REGISTRAR_H_
7 7
8 #include "base/containers/hash_tables.h" 8 #include <unordered_map>
9
9 #include "base/macros.h" 10 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "cc/animation/animation_events.h" 13 #include "cc/animation/animation_events.h"
13 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
14 15
15 namespace cc { 16 namespace cc {
16 17
17 class LayerAnimationController; 18 class LayerAnimationController;
18 19
19 class CC_EXPORT AnimationRegistrar { 20 class CC_EXPORT AnimationRegistrar {
20 public: 21 public:
21 typedef base::hash_map<int, LayerAnimationController*> AnimationControllerMap; 22 typedef std::unordered_map<int, LayerAnimationController*>
danakj 2016/01/14 21:12:32 would you mind changing "typedef" to "using" when
davidben 2016/01/21 01:33:57 Done. There's actually quite a lot of those...
23 AnimationControllerMap;
22 24
23 static scoped_ptr<AnimationRegistrar> Create() { 25 static scoped_ptr<AnimationRegistrar> Create() {
24 return make_scoped_ptr(new AnimationRegistrar()); 26 return make_scoped_ptr(new AnimationRegistrar());
25 } 27 }
26 28
27 virtual ~AnimationRegistrar(); 29 virtual ~AnimationRegistrar();
28 30
29 // If an animation has been registered for the given id, return it. Otherwise 31 // If an animation has been registered for the given id, return it. Otherwise
30 // creates a new one and returns a scoped_refptr to it. 32 // creates a new one and returns a scoped_refptr to it.
31 scoped_refptr<LayerAnimationController> GetAnimationControllerForId(int id); 33 scoped_refptr<LayerAnimationController> GetAnimationControllerForId(int id);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 AnimationControllerMap all_animation_controllers_; 84 AnimationControllerMap all_animation_controllers_;
83 85
84 bool supports_scroll_animations_; 86 bool supports_scroll_animations_;
85 87
86 DISALLOW_COPY_AND_ASSIGN(AnimationRegistrar); 88 DISALLOW_COPY_AND_ASSIGN(AnimationRegistrar);
87 }; 89 };
88 90
89 } // namespace cc 91 } // namespace cc
90 92
91 #endif // CC_ANIMATION_ANIMATION_REGISTRAR_H_ 93 #endif // CC_ANIMATION_ANIMATION_REGISTRAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698