Chromium Code Reviews| 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/test/animation_timelines_test_common.h" | 5 #include "cc/test/animation_timelines_test_common.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "cc/animation/animation_events.h" | 8 #include "cc/animation/animation_events.h" |
| 9 #include "cc/animation/animation_id_provider.h" | 9 #include "cc/animation/animation_id_provider.h" |
| 10 #include "cc/animation/animation_player.h" | 10 #include "cc/animation/animation_player.h" |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 488 | 488 |
| 489 host_->AnimateLayers(time); | 489 host_->AnimateLayers(time); |
| 490 host_->UpdateAnimationState(true, nullptr); | 490 host_->UpdateAnimationState(true, nullptr); |
| 491 host_->SetAnimationEvents(std::move(events)); | 491 host_->SetAnimationEvents(std::move(events)); |
| 492 } | 492 } |
| 493 | 493 |
| 494 AnimationPlayer* AnimationTimelinesTest::GetPlayerForElementId( | 494 AnimationPlayer* AnimationTimelinesTest::GetPlayerForElementId( |
| 495 ElementId element_id) { | 495 ElementId element_id) { |
| 496 const scoped_refptr<ElementAnimations> element_animations = | 496 const scoped_refptr<ElementAnimations> element_animations = |
| 497 host_->GetElementAnimationsForElementId(element_id); | 497 host_->GetElementAnimationsForElementId(element_id); |
| 498 return element_animations ? element_animations->players_list().head()->value() | 498 return element_animations |
| 499 : nullptr; | 499 ? base::ObserverList<AnimationPlayer>::Iterator( |
|
loyso (OOO)
2016/08/05 00:18:48
ElementAnimations::PlayersList type here and every
ymalik
2016/08/05 00:54:05
Done.
| |
| 500 &element_animations->players_list()) | |
| 501 .GetNext() | |
| 502 : nullptr; | |
| 500 } | 503 } |
| 501 | 504 |
| 502 AnimationPlayer* AnimationTimelinesTest::GetImplPlayerForLayerId( | 505 AnimationPlayer* AnimationTimelinesTest::GetImplPlayerForLayerId( |
| 503 ElementId element_id) { | 506 ElementId element_id) { |
| 504 const scoped_refptr<ElementAnimations> element_animations = | 507 const scoped_refptr<ElementAnimations> element_animations = |
| 505 host_impl_->GetElementAnimationsForElementId(element_id); | 508 host_impl_->GetElementAnimationsForElementId(element_id); |
| 506 return element_animations ? element_animations->players_list().head()->value() | 509 return element_animations |
| 507 : nullptr; | 510 ? base::ObserverList<AnimationPlayer>::Iterator( |
| 511 &element_animations->players_list()) | |
| 512 .GetNext() | |
| 513 : nullptr; | |
| 508 } | 514 } |
| 509 | 515 |
| 510 int AnimationTimelinesTest::NextTestLayerId() { | 516 int AnimationTimelinesTest::NextTestLayerId() { |
| 511 next_test_layer_id_++; | 517 next_test_layer_id_++; |
| 512 return next_test_layer_id_; | 518 return next_test_layer_id_; |
| 513 } | 519 } |
| 514 | 520 |
| 515 } // namespace cc | 521 } // namespace cc |
| OLD | NEW |