| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/animation_container.h" | 5 #include "app/animation_container.h" |
| 6 | 6 |
| 7 #include "app/animation.h" | |
| 8 | |
| 9 using base::TimeDelta; | 7 using base::TimeDelta; |
| 10 using base::TimeTicks; | 8 using base::TimeTicks; |
| 11 | 9 |
| 12 AnimationContainer::AnimationContainer() | 10 AnimationContainer::AnimationContainer() |
| 13 : last_tick_time_(TimeTicks::Now()), | 11 : last_tick_time_(TimeTicks::Now()), |
| 14 observer_(NULL) { | 12 observer_(NULL) { |
| 15 } | 13 } |
| 16 | 14 |
| 17 AnimationContainer::~AnimationContainer() { | 15 AnimationContainer::~AnimationContainer() { |
| 18 // The animations own us and stop themselves before being deleted. If | 16 // The animations own us and stop themselves before being deleted. If |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 88 |
| 91 TimeDelta min; | 89 TimeDelta min; |
| 92 Elements::const_iterator i = elements_.begin(); | 90 Elements::const_iterator i = elements_.begin(); |
| 93 min = (*i)->GetTimerInterval(); | 91 min = (*i)->GetTimerInterval(); |
| 94 for (++i; i != elements_.end(); ++i) { | 92 for (++i; i != elements_.end(); ++i) { |
| 95 if ((*i)->GetTimerInterval() < min) | 93 if ((*i)->GetTimerInterval() < min) |
| 96 min = (*i)->GetTimerInterval(); | 94 min = (*i)->GetTimerInterval(); |
| 97 } | 95 } |
| 98 return min; | 96 return min; |
| 99 } | 97 } |
| OLD | NEW |