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