| OLD | NEW |
| 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 Loading... |
| 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::SetEventObserver( | |
| 147 LayerAnimationEventObserver* observer) { | |
| 148 layer_animation_controller_->SetEventObserver(observer); | |
| 149 } | |
| 150 | |
| 151 void ElementAnimations::OnFilterAnimated(LayerTreeType tree_type, | 146 void ElementAnimations::OnFilterAnimated(LayerTreeType tree_type, |
| 152 const FilterOperations& filters) { | 147 const FilterOperations& filters) { |
| 153 DCHECK(layer_id()); | 148 DCHECK(layer_id()); |
| 154 DCHECK(animation_host()); | 149 DCHECK(animation_host()); |
| 155 DCHECK(animation_host()->mutator_host_client()); | 150 DCHECK(animation_host()->mutator_host_client()); |
| 156 animation_host()->mutator_host_client()->SetLayerFilterMutated( | 151 animation_host()->mutator_host_client()->SetLayerFilterMutated( |
| 157 layer_id(), tree_type, filters); | 152 layer_id(), tree_type, filters); |
| 158 } | 153 } |
| 159 | 154 |
| 160 void ElementAnimations::OnOpacityAnimated(LayerTreeType tree_type, | 155 void ElementAnimations::OnOpacityAnimated(LayerTreeType tree_type, |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 if (animation_host()) { | 273 if (animation_host()) { |
| 279 DCHECK(animation_host()->mutator_host_client()); | 274 DCHECK(animation_host()->mutator_host_client()); |
| 280 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( | 275 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( |
| 281 layer_id()); | 276 layer_id()); |
| 282 } | 277 } |
| 283 | 278 |
| 284 return gfx::ScrollOffset(); | 279 return gfx::ScrollOffset(); |
| 285 } | 280 } |
| 286 | 281 |
| 287 } // namespace cc | 282 } // namespace cc |
| OLD | NEW |