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

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

Issue 6154001: Move animation code to new ui/base/animation directory.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2010 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 "app/animation_container.h" 5 #include "ui/base/animation/animation_container.h"
6 6
7 #include "app/animation_container_element.h" 7 #include "ui/base/animation/animation_container_element.h"
8 #include "app/animation_container_observer.h" 8 #include "ui/base/animation/animation_container_observer.h"
9 9
10 using base::TimeDelta; 10 using base::TimeDelta;
11 using base::TimeTicks; 11 using base::TimeTicks;
12 12
13 namespace ui {
14
13 AnimationContainer::AnimationContainer() 15 AnimationContainer::AnimationContainer()
14 : last_tick_time_(TimeTicks::Now()), 16 : last_tick_time_(TimeTicks::Now()),
15 observer_(NULL) { 17 observer_(NULL) {
16 } 18 }
17 19
18 AnimationContainer::~AnimationContainer() { 20 AnimationContainer::~AnimationContainer() {
19 // The animations own us and stop themselves before being deleted. If 21 // The animations own us and stop themselves before being deleted. If
20 // elements_ is not empty, something is wrong. 22 // elements_ is not empty, something is wrong.
21 DCHECK(elements_.empty()); 23 DCHECK(elements_.empty());
22 } 24 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 93
92 TimeDelta min; 94 TimeDelta min;
93 Elements::const_iterator i = elements_.begin(); 95 Elements::const_iterator i = elements_.begin();
94 min = (*i)->GetTimerInterval(); 96 min = (*i)->GetTimerInterval();
95 for (++i; i != elements_.end(); ++i) { 97 for (++i; i != elements_.end(); ++i) {
96 if ((*i)->GetTimerInterval() < min) 98 if ((*i)->GetTimerInterval() < min)
97 min = (*i)->GetTimerInterval(); 99 min = (*i)->GetTimerInterval();
98 } 100 }
99 return min; 101 return min;
100 } 102 }
103
104 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/animation/animation_container.h ('k') | ui/base/animation/animation_container_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698