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

Unified Diff: cc/animation/element_animations.cc

Issue 1887593003: CC Animation: Make layer_animation_controller a private member of ElementAnimations. (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/element_animations.h ('k') | cc/trees/layer_tree_host_unittest_animation.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 b98244409204493b5aa8717ebc3b1991b41cf918..9b2d73d3a8395414bcc040587c1ae364de525693 100644
--- a/cc/animation/element_animations.cc
+++ b/cc/animation/element_animations.cc
@@ -150,10 +150,52 @@ bool ElementAnimations::IsEmpty() const {
void ElementAnimations::PushPropertiesTo(
ElementAnimations* element_animations_impl) {
DCHECK(layer_animation_controller_);
- DCHECK(element_animations_impl->layer_animation_controller());
+ DCHECK(element_animations_impl->layer_animation_controller_);
layer_animation_controller_->PushAnimationUpdatesTo(
- element_animations_impl->layer_animation_controller());
+ element_animations_impl->layer_animation_controller_.get());
+}
+
+void ElementAnimations::AddAnimation(std::unique_ptr<Animation> animation) {
+ layer_animation_controller_->AddAnimation(std::move(animation));
+}
+
+void ElementAnimations::PauseAnimation(int animation_id,
+ base::TimeDelta time_offset) {
+ layer_animation_controller_->PauseAnimation(animation_id, time_offset);
+}
+
+void ElementAnimations::RemoveAnimation(int animation_id) {
+ layer_animation_controller_->RemoveAnimation(animation_id);
+}
+
+void ElementAnimations::AbortAnimation(int animation_id) {
+ layer_animation_controller_->AbortAnimation(animation_id);
+}
+
+void ElementAnimations::AbortAnimations(TargetProperty::Type target_property,
+ bool needs_completion) {
+ layer_animation_controller_->AbortAnimations(target_property,
+ needs_completion);
+}
+
+Animation* ElementAnimations::GetAnimation(
+ TargetProperty::Type target_property) const {
+ return layer_animation_controller_->GetAnimation(target_property);
+}
+
+Animation* ElementAnimations::GetAnimationById(int animation_id) const {
+ return layer_animation_controller_->GetAnimationById(animation_id);
+}
+
+void ElementAnimations::AddEventObserver(
+ LayerAnimationEventObserver* observer) {
+ layer_animation_controller_->AddEventObserver(observer);
+}
+
+void ElementAnimations::RemoveEventObserver(
+ LayerAnimationEventObserver* observer) {
+ layer_animation_controller_->RemoveEventObserver(observer);
}
void ElementAnimations::SetFilterMutated(LayerTreeType tree_type,
« no previous file with comments | « cc/animation/element_animations.h ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698