| 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/element_animations.h" | 5 #include "cc/animation/element_animations.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 void ElementAnimations::NotifyClientScrollOffsetAnimated( | 347 void ElementAnimations::NotifyClientScrollOffsetAnimated( |
| 348 const gfx::ScrollOffset& scroll_offset, | 348 const gfx::ScrollOffset& scroll_offset, |
| 349 bool notify_active_elements, | 349 bool notify_active_elements, |
| 350 bool notify_pending_elements) { | 350 bool notify_pending_elements) { |
| 351 if (notify_active_elements && has_element_in_active_list()) | 351 if (notify_active_elements && has_element_in_active_list()) |
| 352 OnScrollOffsetAnimated(ElementListType::ACTIVE, scroll_offset); | 352 OnScrollOffsetAnimated(ElementListType::ACTIVE, scroll_offset); |
| 353 if (notify_pending_elements && has_element_in_pending_list()) | 353 if (notify_pending_elements && has_element_in_pending_list()) |
| 354 OnScrollOffsetAnimated(ElementListType::PENDING, scroll_offset); | 354 OnScrollOffsetAnimated(ElementListType::PENDING, scroll_offset); |
| 355 } | 355 } |
| 356 | 356 |
| 357 void ElementAnimations::NotifyClientBoundsAnimated( |
| 358 const gfx::SizeF& size, |
| 359 bool notify_active_elements, |
| 360 bool notify_pending_elements) { |
| 361 // TODO(vollick): once we have an animation observer, we can remove client |
| 362 // animated notifications we do not use in element animations, such as this |
| 363 // one. |
| 364 } |
| 365 |
| 357 void ElementAnimations::UpdateClientAnimationState() { | 366 void ElementAnimations::UpdateClientAnimationState() { |
| 358 if (!element_id()) | 367 if (!element_id()) |
| 359 return; | 368 return; |
| 360 DCHECK(animation_host()); | 369 DCHECK(animation_host()); |
| 361 if (!animation_host()->mutator_host_client()) | 370 if (!animation_host()->mutator_host_client()) |
| 362 return; | 371 return; |
| 363 | 372 |
| 364 PropertyAnimationState prev_pending = pending_state_; | 373 PropertyAnimationState prev_pending = pending_state_; |
| 365 PropertyAnimationState prev_active = active_state_; | 374 PropertyAnimationState prev_active = active_state_; |
| 366 | 375 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 if (animation_host()) { | 497 if (animation_host()) { |
| 489 DCHECK(animation_host()->mutator_host_client()); | 498 DCHECK(animation_host()->mutator_host_client()); |
| 490 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( | 499 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( |
| 491 element_id()); | 500 element_id()); |
| 492 } | 501 } |
| 493 | 502 |
| 494 return gfx::ScrollOffset(); | 503 return gfx::ScrollOffset(); |
| 495 } | 504 } |
| 496 | 505 |
| 497 } // namespace cc | 506 } // namespace cc |
| OLD | NEW |