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

Side by Side Diff: ui/gfx/animation/multi_animation.cc

Issue 23531053: ui/base/animation -> ui/gfx/animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 2 trunk Created 7 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 | « ui/gfx/animation/multi_animation.h ('k') | ui/gfx/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) 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/multi_animation.h" 5 #include "ui/gfx/animation/multi_animation.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/animation/animation_delegate.h" 8 #include "ui/gfx/animation/animation_delegate.h"
9 9
10 namespace ui { 10 namespace gfx {
11 11
12 // Default interval, in ms. 12 // Default interval, in ms.
13 static const int kDefaultTimerInterval = 20; 13 static const int kDefaultTimerInterval = 20;
14 14
15 static int TotalTime(const MultiAnimation::Parts& parts) { 15 static int TotalTime(const MultiAnimation::Parts& parts) {
16 int time_ms = 0; 16 int time_ms = 0;
17 for (size_t i = 0; i < parts.size(); ++i) { 17 for (size_t i = 0; i < parts.size(); ++i) {
18 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);
19 time_ms += parts[i].time_ms; 19 time_ms += parts[i].time_ms;
20 } 20 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 *time_ms -= parts_[i].time_ms; 86 *time_ms -= parts_[i].time_ms;
87 } 87 }
88 NOTREACHED(); 88 NOTREACHED();
89 *time_ms = 0; 89 *time_ms = 0;
90 *part_index = 0; 90 *part_index = 0;
91 return parts_[0]; 91 return parts_[0];
92 } 92 }
93 93
94 } // namespace ui 94 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/animation/multi_animation.h ('k') | ui/gfx/animation/multi_animation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698