| OLD | NEW |
| 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 #include "cc/animation_registrar.h" | 5 #include "cc/animation/animation_registrar.h" |
| 6 | 6 |
| 7 #include "cc/layer_animation_controller.h" | 7 #include "cc/animation/layer_animation_controller.h" |
| 8 | 8 |
| 9 namespace cc { | 9 namespace cc { |
| 10 | 10 |
| 11 AnimationRegistrar::AnimationRegistrar() { } | 11 AnimationRegistrar::AnimationRegistrar() { } |
| 12 AnimationRegistrar::~AnimationRegistrar() | 12 AnimationRegistrar::~AnimationRegistrar() |
| 13 { | 13 { |
| 14 AnimationControllerMap copy = all_animation_controllers_; | 14 AnimationControllerMap copy = all_animation_controllers_; |
| 15 for (AnimationControllerMap::iterator iter = copy.begin(); iter != copy.end(
); ++iter) | 15 for (AnimationControllerMap::iterator iter = copy.begin(); iter != copy.end(
); ++iter) |
| 16 (*iter).second->SetAnimationRegistrar(NULL); | 16 (*iter).second->SetAnimationRegistrar(NULL); |
| 17 } | 17 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 42 all_animation_controllers_[controller->id()] = controller; | 42 all_animation_controllers_[controller->id()] = controller; |
| 43 } | 43 } |
| 44 | 44 |
| 45 void AnimationRegistrar::UnregisterAnimationController(LayerAnimationController*
controller) { | 45 void AnimationRegistrar::UnregisterAnimationController(LayerAnimationController*
controller) { |
| 46 if (ContainsKey(all_animation_controllers_, controller->id())) | 46 if (ContainsKey(all_animation_controllers_, controller->id())) |
| 47 all_animation_controllers_.erase(controller->id()); | 47 all_animation_controllers_.erase(controller->id()); |
| 48 DidDeactivateAnimationController(controller); | 48 DidDeactivateAnimationController(controller); |
| 49 } | 49 } |
| 50 | 50 |
| 51 } // namespace cc | 51 } // namespace cc |
| OLD | NEW |