| 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 #ifndef UI_GFX_ANIMATION_MULTI_ANIMATION_H_ | 5 #ifndef UI_GFX_ANIMATION_MULTI_ANIMATION_H_ |
| 6 #define UI_GFX_ANIMATION_MULTI_ANIMATION_H_ | 6 #define UI_GFX_ANIMATION_MULTI_ANIMATION_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // time_ms: the time of the part. | 26 // time_ms: the time of the part. |
| 27 // start_time_ms: the amount of time to offset this part by when calculating | 27 // start_time_ms: the amount of time to offset this part by when calculating |
| 28 // the percented completed. | 28 // the percented completed. |
| 29 // end_time_ms: the end time used to calculate the percentange completed. | 29 // end_time_ms: the end time used to calculate the percentange completed. |
| 30 // | 30 // |
| 31 // In most cases |start_time_ms| = 0 and |end_time_ms| = |time_ms|. But you | 31 // In most cases |start_time_ms| = 0 and |end_time_ms| = |time_ms|. But you |
| 32 // can adjust the start/end for different effects. For example, to run a part | 32 // can adjust the start/end for different effects. For example, to run a part |
| 33 // for 200ms with a % between .25 and .75 use the following three values: 200, | 33 // for 200ms with a % between .25 and .75 use the following three values: 200, |
| 34 // 100, 400. | 34 // 100, 400. |
| 35 struct Part { | 35 struct Part { |
| 36 Part() : time_ms(0), start_time_ms(0), end_time_ms(0), type(Tween::ZERO) {} | 36 Part() : Part(0, Tween::ZERO) {} |
| 37 Part(int time_ms, Tween::Type type) | 37 Part(int time_ms, Tween::Type type) : Part(time_ms, 0, time_ms, type) {} |
| 38 Part(int time_ms, int start_time_ms, int end_time_ms, Tween::Type type) |
| 38 : time_ms(time_ms), | 39 : time_ms(time_ms), |
| 39 start_time_ms(0), | 40 start_time_ms(0), |
| 40 end_time_ms(time_ms), | 41 end_time_ms(time_ms), |
| 41 type(type) {} | 42 type(type) {} |
| 42 | 43 |
| 43 int time_ms; | 44 int time_ms; |
| 44 int start_time_ms; | 45 int start_time_ms; |
| 45 int end_time_ms; | 46 int end_time_ms; |
| 46 Tween::Type type; | 47 Tween::Type type; |
| 47 }; | 48 }; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 91 |
| 91 // See description above setter. | 92 // See description above setter. |
| 92 bool continuous_; | 93 bool continuous_; |
| 93 | 94 |
| 94 DISALLOW_COPY_AND_ASSIGN(MultiAnimation); | 95 DISALLOW_COPY_AND_ASSIGN(MultiAnimation); |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 } // namespace gfx | 98 } // namespace gfx |
| 98 | 99 |
| 99 #endif // UI_GFX_ANIMATION_MULTI_ANIMATION_H_ | 100 #endif // UI_GFX_ANIMATION_MULTI_ANIMATION_H_ |
| OLD | NEW |