| 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_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_events.h" | 15 #include "cc/animation/animation_events.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 | 18 |
| 19 namespace gfx { | 19 namespace gfx { |
| 20 class ScrollOffset; | 20 class ScrollOffset; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 void PushTimelinesToImplThread(AnimationHost* host_impl) const; | 155 void PushTimelinesToImplThread(AnimationHost* host_impl) const; |
| 156 void RemoveTimelinesFromImplThread(AnimationHost* host_impl) const; | 156 void RemoveTimelinesFromImplThread(AnimationHost* host_impl) const; |
| 157 void PushPropertiesToImplThread(AnimationHost* host_impl); | 157 void PushPropertiesToImplThread(AnimationHost* host_impl); |
| 158 | 158 |
| 159 void EraseTimelines(AnimationTimelineList::iterator begin, | 159 void EraseTimelines(AnimationTimelineList::iterator begin, |
| 160 AnimationTimelineList::iterator end); | 160 AnimationTimelineList::iterator end); |
| 161 | 161 |
| 162 // TODO(loyso): For now AnimationPlayers share LayerAnimationController object | 162 // TODO(loyso): For now AnimationPlayers share LayerAnimationController object |
| 163 // if they are attached to the same element(layer). Note that Element can | 163 // if they are attached to the same element(layer). Note that Element can |
| 164 // contain many Layers. | 164 // contain many Layers. |
| 165 typedef base::ScopedPtrHashMap<int, scoped_ptr<ElementAnimations>> | 165 typedef std::unordered_map<int, scoped_ptr<ElementAnimations>> |
| 166 LayerToElementAnimationsMap; | 166 LayerToElementAnimationsMap; |
| 167 LayerToElementAnimationsMap layer_to_element_animations_map_; | 167 LayerToElementAnimationsMap layer_to_element_animations_map_; |
| 168 | 168 |
| 169 AnimationTimelineList timelines_; | 169 AnimationTimelineList timelines_; |
| 170 scoped_ptr<AnimationRegistrar> animation_registrar_; | 170 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 171 MutatorHostClient* mutator_host_client_; | 171 MutatorHostClient* mutator_host_client_; |
| 172 | 172 |
| 173 class ScrollOffsetAnimations; | 173 class ScrollOffsetAnimations; |
| 174 scoped_ptr<ScrollOffsetAnimations> scroll_offset_animations_; | 174 scoped_ptr<ScrollOffsetAnimations> scroll_offset_animations_; |
| 175 | 175 |
| 176 const ThreadInstance thread_instance_; | 176 const ThreadInstance thread_instance_; |
| 177 | 177 |
| 178 DISALLOW_COPY_AND_ASSIGN(AnimationHost); | 178 DISALLOW_COPY_AND_ASSIGN(AnimationHost); |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace cc | 181 } // namespace cc |
| 182 | 182 |
| 183 #endif // CC_ANIMATION_ANIMATION_HOST_H_ | 183 #endif // CC_ANIMATION_ANIMATION_HOST_H_ |
| OLD | NEW |