| 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/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 Loading... |
| 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 |
| OLD | NEW |