OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gfx/compositor/layer_animator.h" | 5 #include "ui/gfx/compositor/layer_animator.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/base/animation/animation_container.h" | 10 #include "ui/base/animation/animation_container.h" |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 AddToQueueIfNotPresent(sequence); | 527 AddToQueueIfNotPresent(sequence); |
528 | 528 |
529 // Ensure that animations get stepped at their start time. | 529 // Ensure that animations get stepped at their start time. |
530 Step(start_time); | 530 Step(start_time); |
531 | 531 |
532 return true; | 532 return true; |
533 } | 533 } |
534 | 534 |
535 void LayerAnimator::GetTargetValue( | 535 void LayerAnimator::GetTargetValue( |
536 LayerAnimationElement::TargetValue* target) const { | 536 LayerAnimationElement::TargetValue* target) const { |
537 for (RunningAnimations::const_iterator iter = running_animations_.begin(); | 537 for (AnimationQueue::const_iterator iter = animation_queue_.begin(); |
538 iter != running_animations_.end(); ++iter) { | 538 iter != animation_queue_.end(); ++iter) { |
539 (*iter).sequence->GetTargetValue(target); | 539 (*iter)->GetTargetValue(target); |
540 } | 540 } |
541 } | 541 } |
542 | 542 |
543 void LayerAnimator::OnScheduled(LayerAnimationSequence* sequence) { | 543 void LayerAnimator::OnScheduled(LayerAnimationSequence* sequence) { |
544 if (observers_.might_have_observers()) { | 544 if (observers_.might_have_observers()) { |
545 ObserverListBase<LayerAnimationObserver>::Iterator it(observers_); | 545 ObserverListBase<LayerAnimationObserver>::Iterator it(observers_); |
546 LayerAnimationObserver* obs; | 546 LayerAnimationObserver* obs; |
547 while ((obs = it.GetNext()) != NULL) { | 547 while ((obs = it.GetNext()) != NULL) { |
548 sequence->AddObserver(obs); | 548 sequence->AddObserver(obs); |
549 } | 549 } |
550 } | 550 } |
551 sequence->OnScheduled(); | 551 sequence->OnScheduled(); |
552 } | 552 } |
553 | 553 |
554 } // namespace ui | 554 } // namespace ui |
OLD | NEW |