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

Side by Side Diff: cc/animation/animation_host.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 unified diff | Download patch
« no previous file with comments | « cc/animation/animation_host.h ('k') | cc/animation/animation_player_unittest.cc » ('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/animation_host.h" 5 #include "cc/animation/animation_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 DCHECK(scroll_offset_animations_); 597 DCHECK(scroll_offset_animations_);
598 return scroll_offset_animations_->ScrollAnimationUpdateTarget( 598 return scroll_offset_animations_->ScrollAnimationUpdateTarget(
599 layer_id, scroll_delta, max_scroll_offset, frame_monotonic_time); 599 layer_id, scroll_delta, max_scroll_offset, frame_monotonic_time);
600 } 600 }
601 601
602 void AnimationHost::ScrollAnimationAbort(bool needs_completion) { 602 void AnimationHost::ScrollAnimationAbort(bool needs_completion) {
603 DCHECK(scroll_offset_animations_); 603 DCHECK(scroll_offset_animations_);
604 return scroll_offset_animations_->ScrollAnimationAbort(needs_completion); 604 return scroll_offset_animations_->ScrollAnimationAbort(needs_completion);
605 } 605 }
606 606
607 scoped_refptr<LayerAnimationController>
608 AnimationHost::GetAnimationControllerForId(int id) {
609 return animation_registrar_->GetAnimationControllerForId(id);
610 }
611
612 void AnimationHost::SetAnimationRegistrarFor(
613 scoped_refptr<LayerAnimationController> controller) {
614 controller->SetAnimationRegistrar(animation_registrar_.get());
615 }
616
617 void AnimationHost::ResetAnimationRegistrarFor(
618 scoped_refptr<LayerAnimationController> controller) {
619 controller->SetAnimationRegistrar(nullptr);
620 }
621
622 void AnimationHost::RegisterAnimationController(
623 LayerAnimationController* controller) {
624 animation_registrar_->RegisterAnimationController(controller);
625 }
626
627 void AnimationHost::UnregisterAnimationController(
628 LayerAnimationController* controller) {
629 animation_registrar_->UnregisterAnimationController(controller);
630 }
631
632 const AnimationHost::AnimationControllerMap&
633 AnimationHost::active_animation_controllers_for_testing() const {
634 return animation_registrar_->active_animation_controllers_for_testing();
635 }
636
637 const AnimationHost::AnimationControllerMap&
638 AnimationHost::all_animation_controllers_for_testing() const {
639 return animation_registrar_->all_animation_controllers_for_testing();
640 }
641
607 } // namespace cc 642 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/animation_host.h ('k') | cc/animation/animation_player_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698