OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 APP_MULTI_ANIMATION_H_ | 5 #ifndef APP_MULTI_ANIMATION_H_ |
6 #define APP_MULTI_ANIMATION_H_ | 6 #define APP_MULTI_ANIMATION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 explicit MultiAnimation(const Parts& parts); | 47 explicit MultiAnimation(const Parts& parts); |
48 virtual ~MultiAnimation(); | 48 virtual ~MultiAnimation(); |
49 | 49 |
50 // Sets whether the animation continues after it reaches the end. If true, the | 50 // Sets whether the animation continues after it reaches the end. If true, the |
51 // animation runs until explicitly stopped. The default is true. | 51 // animation runs until explicitly stopped. The default is true. |
52 void set_continuous(bool continuous) { continuous_ = continuous; } | 52 void set_continuous(bool continuous) { continuous_ = continuous; } |
53 | 53 |
54 // Returns the current value. The current value for a MultiAnimation is | 54 // Returns the current value. The current value for a MultiAnimation is |
55 // determined from the tween type of the current part. | 55 // determined from the tween type of the current part. |
56 virtual double GetCurrentValue() const { return current_value_; } | 56 virtual double GetCurrentValue() const; |
57 | 57 |
58 // Returns the index of the current part. | 58 // Returns the index of the current part. |
59 size_t current_part_index() const { return current_part_index_; } | 59 size_t current_part_index() const { return current_part_index_; } |
60 | 60 |
61 protected: | 61 protected: |
62 // Animation overrides. | 62 // Animation overrides. |
63 virtual void Step(base::TimeTicks time_now); | 63 virtual void Step(base::TimeTicks time_now); |
64 virtual void SetStartTime(base::TimeTicks start_time); | 64 virtual void SetStartTime(base::TimeTicks start_time); |
65 | 65 |
66 private: | 66 private: |
(...skipping 14 matching lines...) Expand all Loading... |
81 // Index of the current part. | 81 // Index of the current part. |
82 size_t current_part_index_; | 82 size_t current_part_index_; |
83 | 83 |
84 // See description above setter. | 84 // See description above setter. |
85 bool continuous_; | 85 bool continuous_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(MultiAnimation); | 87 DISALLOW_COPY_AND_ASSIGN(MultiAnimation); |
88 }; | 88 }; |
89 | 89 |
90 #endif // APP_MULTI_ANIMATION_H_ | 90 #endif // APP_MULTI_ANIMATION_H_ |
OLD | NEW |