| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |