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

Side by Side Diff: ui/compositor/layer_animator.cc

Issue 982413002: base: Stop passing a non-const ref to ObserverListBase::Iterator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: observerref: fixwindowsbuild Created 5 years, 9 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 | « ui/compositor/layer_animation_sequence.cc ('k') | ui/events/platform/platform_event_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/compositor/layer_animation_sequence.cc ('k') | ui/events/platform/platform_event_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698