| 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/compositor/layer_animator.h" | 5 #include "ui/compositor/layer_animator.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "cc/animation/animation_id_provider.h" | 10 #include "cc/animation/animation_id_provider.h" |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 void LayerAnimator::GetTargetValue( | 794 void LayerAnimator::GetTargetValue( |
| 795 LayerAnimationElement::TargetValue* target) const { | 795 LayerAnimationElement::TargetValue* target) const { |
| 796 for (AnimationQueue::const_iterator iter = animation_queue_.begin(); | 796 for (AnimationQueue::const_iterator iter = animation_queue_.begin(); |
| 797 iter != animation_queue_.end(); ++iter) { | 797 iter != animation_queue_.end(); ++iter) { |
| 798 (*iter)->GetTargetValue(target); | 798 (*iter)->GetTargetValue(target); |
| 799 } | 799 } |
| 800 } | 800 } |
| 801 | 801 |
| 802 void LayerAnimator::OnScheduled(LayerAnimationSequence* sequence) { | 802 void LayerAnimator::OnScheduled(LayerAnimationSequence* sequence) { |
| 803 if (observers_.might_have_observers()) { | 803 if (observers_.might_have_observers()) { |
| 804 ObserverListBase<LayerAnimationObserver>::Iterator it(observers_); | 804 ObserverListBase<LayerAnimationObserver>::Iterator it(&observers_); |
| 805 LayerAnimationObserver* obs; | 805 LayerAnimationObserver* obs; |
| 806 while ((obs = it.GetNext()) != NULL) { | 806 while ((obs = it.GetNext()) != NULL) { |
| 807 sequence->AddObserver(obs); | 807 sequence->AddObserver(obs); |
| 808 } | 808 } |
| 809 } | 809 } |
| 810 sequence->OnScheduled(); | 810 sequence->OnScheduled(); |
| 811 } | 811 } |
| 812 | 812 |
| 813 void LayerAnimator::SetTransitionDuration(base::TimeDelta duration) { | 813 void LayerAnimator::SetTransitionDuration(base::TimeDelta duration) { |
| 814 if (is_transition_duration_locked_) | 814 if (is_transition_duration_locked_) |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 } | 852 } |
| 853 | 853 |
| 854 LayerAnimator::RunningAnimation::RunningAnimation( | 854 LayerAnimator::RunningAnimation::RunningAnimation( |
| 855 const base::WeakPtr<LayerAnimationSequence>& sequence) | 855 const base::WeakPtr<LayerAnimationSequence>& sequence) |
| 856 : sequence_(sequence) { | 856 : sequence_(sequence) { |
| 857 } | 857 } |
| 858 | 858 |
| 859 LayerAnimator::RunningAnimation::~RunningAnimation() { } | 859 LayerAnimator::RunningAnimation::~RunningAnimation() { } |
| 860 | 860 |
| 861 } // namespace ui | 861 } // namespace ui |
| OLD | NEW |