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