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

Side by Side Diff: ui/base/animation/animation_container.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/screen_recorder.cc ('k') | views/controls/menu/menu_controller.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/base/animation/animation_container.h" 5 #include "ui/base/animation/animation_container.h"
6 6
7 #include "ui/base/animation/animation_container_element.h" 7 #include "ui/base/animation/animation_container_element.h"
8 #include "ui/base/animation/animation_container_observer.h" 8 #include "ui/base/animation/animation_container_observer.h"
9 9
10 using base::TimeDelta; 10 using base::TimeDelta;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 if (observer_) 79 if (observer_)
80 observer_->AnimationContainerProgressed(this); 80 observer_->AnimationContainerProgressed(this);
81 } 81 }
82 82
83 void AnimationContainer::SetMinTimerInterval(base::TimeDelta delta) { 83 void AnimationContainer::SetMinTimerInterval(base::TimeDelta delta) {
84 // This doesn't take into account how far along the current element is, but 84 // This doesn't take into account how far along the current element is, but
85 // that shouldn't be a problem for uses of Animation/AnimationContainer. 85 // that shouldn't be a problem for uses of Animation/AnimationContainer.
86 timer_.Stop(); 86 timer_.Stop();
87 min_timer_interval_ = delta; 87 min_timer_interval_ = delta;
88 timer_.Start(FROM_HERE, min_timer_interval_, this, &AnimationContainer::Run); 88 timer_.Start(min_timer_interval_, this, &AnimationContainer::Run);
89 } 89 }
90 90
91 TimeDelta AnimationContainer::GetMinInterval() { 91 TimeDelta AnimationContainer::GetMinInterval() {
92 DCHECK(!elements_.empty()); 92 DCHECK(!elements_.empty());
93 93
94 TimeDelta min; 94 TimeDelta min;
95 Elements::const_iterator i = elements_.begin(); 95 Elements::const_iterator i = elements_.begin();
96 min = (*i)->GetTimerInterval(); 96 min = (*i)->GetTimerInterval();
97 for (++i; i != elements_.end(); ++i) { 97 for (++i; i != elements_.end(); ++i) {
98 if ((*i)->GetTimerInterval() < min) 98 if ((*i)->GetTimerInterval() < min)
99 min = (*i)->GetTimerInterval(); 99 min = (*i)->GetTimerInterval();
100 } 100 }
101 return min; 101 return min;
102 } 102 }
103 103
104 } // namespace ui 104 } // namespace ui
OLDNEW
« no previous file with comments | « remoting/host/screen_recorder.cc ('k') | views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698