| Index: ui/compositor/layer_animator.cc
|
| diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
|
| index 787b12157ef002f4df3ab7345f2a7f177b6c117a..113e4d0ae85adc8f9d922f9a659024779fddd024 100644
|
| --- a/ui/compositor/layer_animator.cc
|
| +++ b/ui/compositor/layer_animator.cc
|
| @@ -196,17 +196,13 @@ void LayerAnimator::AttachLayerToAnimationPlayer(int layer_id) {
|
| else
|
| DCHECK_EQ(animation_player_->layer_id(), layer_id);
|
|
|
| - if (animation_player_->element_animations()) {
|
| - animation_player_->element_animations()
|
| - ->AddEventObserver(this);
|
| - }
|
| + if (animation_player_->element_animations())
|
| + animation_player_->element_animations()->SetEventObserver(this);
|
| }
|
|
|
| void LayerAnimator::DetachLayerFromAnimationPlayer() {
|
| - if (animation_player_->element_animations()) {
|
| - animation_player_->element_animations()
|
| - ->RemoveEventObserver(this);
|
| - }
|
| + if (animation_player_->element_animations())
|
| + animation_player_->element_animations()->SetEventObserver(nullptr);
|
|
|
| if (animation_player_->layer_id())
|
| animation_player_->DetachLayer();
|
|
|