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

Unified Diff: cc/animation_registrar.cc

Issue 12822004: Part 3 of cc/ directory shuffles: animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation_registrar.h ('k') | cc/animation_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation_registrar.cc
diff --git a/cc/animation_registrar.cc b/cc/animation_registrar.cc
deleted file mode 100644
index 6b6629e8b3d8bff027f927d1dea3a8bec9730ec5..0000000000000000000000000000000000000000
--- a/cc/animation_registrar.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/animation_registrar.h"
-
-#include "cc/layer_animation_controller.h"
-
-namespace cc {
-
-AnimationRegistrar::AnimationRegistrar() { }
-AnimationRegistrar::~AnimationRegistrar()
-{
- AnimationControllerMap copy = all_animation_controllers_;
- for (AnimationControllerMap::iterator iter = copy.begin(); iter != copy.end(); ++iter)
- (*iter).second->SetAnimationRegistrar(NULL);
-}
-
-scoped_refptr<LayerAnimationController>
-AnimationRegistrar::GetAnimationControllerForId(int id)
-{
- scoped_refptr<LayerAnimationController> toReturn;
- if (!ContainsKey(all_animation_controllers_, id)) {
- toReturn = LayerAnimationController::Create(id);
- toReturn->SetAnimationRegistrar(this);
- all_animation_controllers_[id] = toReturn.get();
- } else
- toReturn = all_animation_controllers_[id];
- return toReturn;
-}
-
-void AnimationRegistrar::DidActivateAnimationController(LayerAnimationController* controller) {
- active_animation_controllers_[controller->id()] = controller;
-}
-
-void AnimationRegistrar::DidDeactivateAnimationController(LayerAnimationController* controller) {
- if (ContainsKey(active_animation_controllers_, controller->id()))
- active_animation_controllers_.erase(controller->id());
-}
-
-void AnimationRegistrar::RegisterAnimationController(LayerAnimationController* controller) {
- all_animation_controllers_[controller->id()] = controller;
-}
-
-void AnimationRegistrar::UnregisterAnimationController(LayerAnimationController* controller) {
- if (ContainsKey(all_animation_controllers_, controller->id()))
- all_animation_controllers_.erase(controller->id());
- DidDeactivateAnimationController(controller);
-}
-
-} // namespace cc
« no previous file with comments | « cc/animation_registrar.h ('k') | cc/animation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698