| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CC_ANIMATION_ANIMATION_PLAYER_H_ | 5 #ifndef CC_ANIMATION_ANIMATION_PLAYER_H_ |
| 6 #define CC_ANIMATION_ANIMATION_PLAYER_H_ | 6 #define CC_ANIMATION_ANIMATION_PLAYER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 int group); | 81 int group); |
| 82 void NotifyAnimationAborted(base::TimeTicks monotonic_time, | 82 void NotifyAnimationAborted(base::TimeTicks monotonic_time, |
| 83 TargetProperty::Type target_property, | 83 TargetProperty::Type target_property, |
| 84 int group); | 84 int group); |
| 85 void NotifyAnimationWaitingForDeletion(); | 85 void NotifyAnimationWaitingForDeletion(); |
| 86 void NotifyAnimationTakeover(base::TimeTicks monotonic_time, | 86 void NotifyAnimationTakeover(base::TimeTicks monotonic_time, |
| 87 TargetProperty::Type target_property, | 87 TargetProperty::Type target_property, |
| 88 double animation_start_time, | 88 double animation_start_time, |
| 89 std::unique_ptr<AnimationCurve> curve); | 89 std::unique_ptr<AnimationCurve> curve); |
| 90 | 90 |
| 91 // Whether this player has animations waiting to get sent to ElementAnimations | 91 // Returns true if there are any animations at all to process. |
| 92 bool has_pending_animations_for_testing() const { | 92 bool has_any_animation() const { return !animations_.empty(); } |
| 93 return !animations_.empty(); | |
| 94 } | |
| 95 | 93 |
| 96 bool needs_push_properties() const { return needs_push_properties_; } | 94 bool needs_push_properties() const { return needs_push_properties_; } |
| 97 void SetNeedsPushProperties(); | 95 void SetNeedsPushProperties(); |
| 98 | 96 |
| 99 private: | 97 private: |
| 100 friend class base::RefCounted<AnimationPlayer>; | 98 friend class base::RefCounted<AnimationPlayer>; |
| 101 | 99 |
| 102 explicit AnimationPlayer(int id); | 100 explicit AnimationPlayer(int id); |
| 103 ~AnimationPlayer(); | 101 ~AnimationPlayer(); |
| 104 | 102 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 124 int id_; | 122 int id_; |
| 125 ElementId element_id_; | 123 ElementId element_id_; |
| 126 bool needs_push_properties_; | 124 bool needs_push_properties_; |
| 127 | 125 |
| 128 DISALLOW_COPY_AND_ASSIGN(AnimationPlayer); | 126 DISALLOW_COPY_AND_ASSIGN(AnimationPlayer); |
| 129 }; | 127 }; |
| 130 | 128 |
| 131 } // namespace cc | 129 } // namespace cc |
| 132 | 130 |
| 133 #endif // CC_ANIMATION_ANIMATION_PLAYER_H_ | 131 #endif // CC_ANIMATION_ANIMATION_PLAYER_H_ |
| OLD | NEW |