| 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 #ifndef CC_ANIMATION_ANIMATION_HOST_H_ | 5 #ifndef CC_ANIMATION_ANIMATION_HOST_H_ |
| 6 #define CC_ANIMATION_ANIMATION_HOST_H_ | 6 #define CC_ANIMATION_ANIMATION_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 | 10 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 float* max_scale) const; | 135 float* max_scale) const; |
| 136 bool AnimationStartScale(ElementId element_id, | 136 bool AnimationStartScale(ElementId element_id, |
| 137 ElementListType list_type, | 137 ElementListType list_type, |
| 138 float* start_scale) const; | 138 float* start_scale) const; |
| 139 | 139 |
| 140 bool HasAnyAnimation(ElementId element_id) const; | 140 bool HasAnyAnimation(ElementId element_id) const; |
| 141 bool HasActiveAnimationForTesting(ElementId element_id) const; | 141 bool HasActiveAnimationForTesting(ElementId element_id) const; |
| 142 | 142 |
| 143 void ImplOnlyScrollAnimationCreate(ElementId element_id, | 143 void ImplOnlyScrollAnimationCreate(ElementId element_id, |
| 144 const gfx::ScrollOffset& target_offset, | 144 const gfx::ScrollOffset& target_offset, |
| 145 const gfx::ScrollOffset& current_offset); | 145 const gfx::ScrollOffset& current_offset, |
| 146 base::TimeDelta delayed_by); |
| 146 bool ImplOnlyScrollAnimationUpdateTarget( | 147 bool ImplOnlyScrollAnimationUpdateTarget( |
| 147 ElementId element_id, | 148 ElementId element_id, |
| 148 const gfx::Vector2dF& scroll_delta, | 149 const gfx::Vector2dF& scroll_delta, |
| 149 const gfx::ScrollOffset& max_scroll_offset, | 150 const gfx::ScrollOffset& max_scroll_offset, |
| 150 base::TimeTicks frame_monotonic_time); | 151 base::TimeTicks frame_monotonic_time, |
| 152 base::TimeDelta delayed_by); |
| 151 | 153 |
| 152 void ScrollAnimationAbort(bool needs_completion); | 154 void ScrollAnimationAbort(bool needs_completion); |
| 153 | 155 |
| 154 // This should only be called from the main thread. | 156 // This should only be called from the main thread. |
| 155 ScrollOffsetAnimations& scroll_offset_animations() const; | 157 ScrollOffsetAnimations& scroll_offset_animations() const; |
| 156 | 158 |
| 157 // Registers the given element animations as active. An active element | 159 // Registers the given element animations as active. An active element |
| 158 // animations is one that has a running animation that needs to be ticked. | 160 // animations is one that has a running animation that needs to be ticked. |
| 159 void DidActivateElementAnimations(ElementAnimations* element_animations); | 161 void DidActivateElementAnimations(ElementAnimations* element_animations); |
| 160 | 162 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 203 |
| 202 bool supports_scroll_animations_; | 204 bool supports_scroll_animations_; |
| 203 bool animation_waiting_for_deletion_; | 205 bool animation_waiting_for_deletion_; |
| 204 | 206 |
| 205 DISALLOW_COPY_AND_ASSIGN(AnimationHost); | 207 DISALLOW_COPY_AND_ASSIGN(AnimationHost); |
| 206 }; | 208 }; |
| 207 | 209 |
| 208 } // namespace cc | 210 } // namespace cc |
| 209 | 211 |
| 210 #endif // CC_ANIMATION_ANIMATION_HOST_H_ | 212 #endif // CC_ANIMATION_ANIMATION_HOST_H_ |
| OLD | NEW |