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

Side by Side Diff: cc/animation/element_animations.cc

Issue 1893253002: CC Animation: Make LayerAnimationController to have just one event observer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rc
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 unified diff | Download patch
« no previous file with comments | « cc/animation/element_animations.h ('k') | cc/animation/layer_animation_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "cc/animation/element_animations.h" 5 #include "cc/animation/element_animations.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "cc/animation/animation_host.h" 9 #include "cc/animation/animation_host.h"
10 #include "cc/animation/animation_player.h" 10 #include "cc/animation/animation_player.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 Animation* ElementAnimations::GetAnimation( 137 Animation* ElementAnimations::GetAnimation(
138 TargetProperty::Type target_property) const { 138 TargetProperty::Type target_property) const {
139 return layer_animation_controller_->GetAnimation(target_property); 139 return layer_animation_controller_->GetAnimation(target_property);
140 } 140 }
141 141
142 Animation* ElementAnimations::GetAnimationById(int animation_id) const { 142 Animation* ElementAnimations::GetAnimationById(int animation_id) const {
143 return layer_animation_controller_->GetAnimationById(animation_id); 143 return layer_animation_controller_->GetAnimationById(animation_id);
144 } 144 }
145 145
146 void ElementAnimations::AddEventObserver( 146 void ElementAnimations::SetEventObserver(
147 LayerAnimationEventObserver* observer) { 147 LayerAnimationEventObserver* observer) {
148 layer_animation_controller_->AddEventObserver(observer); 148 layer_animation_controller_->SetEventObserver(observer);
149 }
150
151 void ElementAnimations::RemoveEventObserver(
152 LayerAnimationEventObserver* observer) {
153 layer_animation_controller_->RemoveEventObserver(observer);
154 } 149 }
155 150
156 void ElementAnimations::OnFilterAnimated(LayerTreeType tree_type, 151 void ElementAnimations::OnFilterAnimated(LayerTreeType tree_type,
157 const FilterOperations& filters) { 152 const FilterOperations& filters) {
158 DCHECK(layer_id()); 153 DCHECK(layer_id());
159 DCHECK(animation_host()); 154 DCHECK(animation_host());
160 DCHECK(animation_host()->mutator_host_client()); 155 DCHECK(animation_host()->mutator_host_client());
161 animation_host()->mutator_host_client()->SetLayerFilterMutated( 156 animation_host()->mutator_host_client()->SetLayerFilterMutated(
162 layer_id(), tree_type, filters); 157 layer_id(), tree_type, filters);
163 } 158 }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 if (animation_host()) { 278 if (animation_host()) {
284 DCHECK(animation_host()->mutator_host_client()); 279 DCHECK(animation_host()->mutator_host_client());
285 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( 280 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation(
286 layer_id()); 281 layer_id());
287 } 282 }
288 283
289 return gfx::ScrollOffset(); 284 return gfx::ScrollOffset();
290 } 285 }
291 286
292 } // namespace cc 287 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/element_animations.h ('k') | cc/animation/layer_animation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698