| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 bool AnimationHost::ImplOnlyScrollAnimationUpdateTarget( | 496 bool AnimationHost::ImplOnlyScrollAnimationUpdateTarget( |
| 497 ElementId element_id, | 497 ElementId element_id, |
| 498 const gfx::Vector2dF& scroll_delta, | 498 const gfx::Vector2dF& scroll_delta, |
| 499 const gfx::ScrollOffset& max_scroll_offset, | 499 const gfx::ScrollOffset& max_scroll_offset, |
| 500 base::TimeTicks frame_monotonic_time) { | 500 base::TimeTicks frame_monotonic_time) { |
| 501 DCHECK(scroll_offset_animations_impl_); | 501 DCHECK(scroll_offset_animations_impl_); |
| 502 return scroll_offset_animations_impl_->ScrollAnimationUpdateTarget( | 502 return scroll_offset_animations_impl_->ScrollAnimationUpdateTarget( |
| 503 element_id, scroll_delta, max_scroll_offset, frame_monotonic_time); | 503 element_id, scroll_delta, max_scroll_offset, frame_monotonic_time); |
| 504 } | 504 } |
| 505 | 505 |
| 506 void AnimationHost::ImplOnlyScrollAnimationAdjustDuration( |
| 507 ElementId element_id, |
| 508 base::TimeDelta adjustment) { |
| 509 DCHECK(scroll_offset_animations_impl_); |
| 510 scroll_offset_animations_impl_->ScrollAnimationAdjustDuration(element_id, |
| 511 adjustment); |
| 512 } |
| 513 |
| 506 ScrollOffsetAnimations& AnimationHost::scroll_offset_animations() const { | 514 ScrollOffsetAnimations& AnimationHost::scroll_offset_animations() const { |
| 507 DCHECK(scroll_offset_animations_); | 515 DCHECK(scroll_offset_animations_); |
| 508 return *scroll_offset_animations_.get(); | 516 return *scroll_offset_animations_.get(); |
| 509 } | 517 } |
| 510 | 518 |
| 511 void AnimationHost::ScrollAnimationAbort(bool needs_completion) { | 519 void AnimationHost::ScrollAnimationAbort(bool needs_completion) { |
| 512 DCHECK(scroll_offset_animations_impl_); | 520 DCHECK(scroll_offset_animations_impl_); |
| 513 return scroll_offset_animations_impl_->ScrollAnimationAbort(needs_completion); | 521 return scroll_offset_animations_impl_->ScrollAnimationAbort(needs_completion); |
| 514 } | 522 } |
| 515 | 523 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 const AnimationHost::ElementToAnimationsMap& | 556 const AnimationHost::ElementToAnimationsMap& |
| 549 AnimationHost::all_element_animations_for_testing() const { | 557 AnimationHost::all_element_animations_for_testing() const { |
| 550 return element_to_animations_map_; | 558 return element_to_animations_map_; |
| 551 } | 559 } |
| 552 | 560 |
| 553 void AnimationHost::OnAnimationWaitingForDeletion() { | 561 void AnimationHost::OnAnimationWaitingForDeletion() { |
| 554 animation_waiting_for_deletion_ = true; | 562 animation_waiting_for_deletion_ = true; |
| 555 } | 563 } |
| 556 | 564 |
| 557 } // namespace cc | 565 } // namespace cc |
| OLD | NEW |