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

Unified Diff: cc/animation/element_animations.cc

Issue 1877073006: CC Animation: Make AnimationRegistrar a private member of AnimationHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/animation_player_unittest.cc ('k') | cc/animation/element_animations_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/element_animations.cc
diff --git a/cc/animation/element_animations.cc b/cc/animation/element_animations.cc
index 57985d902b6d6aca23bac03ba4919cd45556636b..fe2e65a046d993f36f9f78116b51c8da97440cff 100644
--- a/cc/animation/element_animations.cc
+++ b/cc/animation/element_animations.cc
@@ -8,7 +8,6 @@
#include "base/memory/ptr_util.h"
#include "cc/animation/animation_host.h"
#include "cc/animation/animation_player.h"
-#include "cc/animation/animation_registrar.h"
#include "cc/animation/layer_animation_value_observer.h"
#include "cc/trees/mutator_host_client.h"
@@ -76,12 +75,9 @@ void ElementAnimations::CreateLayerAnimationController(int layer_id) {
DCHECK(!layer_animation_controller_);
DCHECK(animation_host_);
- AnimationRegistrar* registrar = animation_host_->animation_registrar();
- DCHECK(registrar);
-
layer_animation_controller_ =
- registrar->GetAnimationControllerForId(layer_id);
- layer_animation_controller_->SetAnimationRegistrar(registrar);
+ animation_host_->GetAnimationControllerForId(layer_id);
+ animation_host_->SetAnimationRegistrarFor(layer_animation_controller_);
layer_animation_controller_->set_layer_animation_delegate(this);
layer_animation_controller_->set_value_provider(this);
@@ -108,7 +104,7 @@ void ElementAnimations::DestroyLayerAnimationController() {
if (layer_animation_controller_) {
layer_animation_controller_->remove_value_provider(this);
layer_animation_controller_->remove_layer_animation_delegate(this);
- layer_animation_controller_->SetAnimationRegistrar(nullptr);
+ animation_host_->ResetAnimationRegistrarFor(layer_animation_controller_);
layer_animation_controller_ = nullptr;
}
}
« no previous file with comments | « cc/animation/animation_player_unittest.cc ('k') | cc/animation/element_animations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698