Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1003)

Side by Side Diff: cc/test/animation_timelines_test_common.cc

Issue 2189813002: ElementAnimations should hold an ObservableList of AnimationPlayers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix windows bot Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/animation/element_animations_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 ? ElementAnimations::PlayersList::Iterator(
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 ? ElementAnimations::PlayersList::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
OLDNEW
« no previous file with comments | « cc/animation/element_animations_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698