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

Side by Side Diff: ui/base/animation/multi_animation.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
« no previous file with comments | « ui/base/animation/multi_animation.h ('k') | ui/base/animation/multi_animation_unittest.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) 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/multi_animation.h" 5 #include "ui/base/animation/multi_animation.h"
6 6
7 #include "app/animation_delegate.h"
8 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/animation/animation_delegate.h"
9
10 namespace ui {
9 11
10 // Default interval, in ms. 12 // Default interval, in ms.
11 static const int kDefaultInterval = 20; 13 static const int kDefaultInterval = 20;
12 14
13 static int TotalTime(const MultiAnimation::Parts& parts) { 15 static int TotalTime(const MultiAnimation::Parts& parts) {
14 int time_ms = 0; 16 int time_ms = 0;
15 for (size_t i = 0; i < parts.size(); ++i) { 17 for (size_t i = 0; i < parts.size(); ++i) {
16 DCHECK(parts[i].end_time_ms - parts[i].start_time_ms >= parts[i].time_ms); 18 DCHECK(parts[i].end_time_ms - parts[i].start_time_ms >= parts[i].time_ms);
17 time_ms += parts[i].time_ms; 19 time_ms += parts[i].time_ms;
18 } 20 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return parts_[i]; 77 return parts_[i];
76 } 78 }
77 79
78 *time_ms -= parts_[i].time_ms; 80 *time_ms -= parts_[i].time_ms;
79 } 81 }
80 NOTREACHED(); 82 NOTREACHED();
81 *time_ms = 0; 83 *time_ms = 0;
82 *part_index = 0; 84 *part_index = 0;
83 return parts_[0]; 85 return parts_[0];
84 } 86 }
87
88 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/animation/multi_animation.h ('k') | ui/base/animation/multi_animation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698