| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_EVENTS_H_ | 5 #ifndef CC_ANIMATION_ANIMATION_EVENTS_H_ |
| 6 #define CC_ANIMATION_ANIMATION_EVENTS_H_ | 6 #define CC_ANIMATION_ANIMATION_EVENTS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" |
| 10 #include "cc/animation/animation.h" | 11 #include "cc/animation/animation.h" |
| 12 #include "cc/animation/animation_curve.h" |
| 11 #include "cc/base/cc_export.h" | 13 #include "cc/base/cc_export.h" |
| 12 #include "cc/output/filter_operations.h" | 14 #include "cc/output/filter_operations.h" |
| 13 #include "ui/gfx/transform.h" | 15 #include "ui/gfx/transform.h" |
| 14 | 16 |
| 15 namespace cc { | 17 namespace cc { |
| 16 | 18 |
| 17 struct CC_EXPORT AnimationEvent { | 19 struct CC_EXPORT AnimationEvent { |
| 18 enum Type { STARTED, FINISHED, ABORTED, PROPERTY_UPDATE }; | 20 enum Type { STARTED, FINISHED, ABORTED, PROPERTY_UPDATE, TAKEOVER }; |
| 19 | 21 |
| 20 AnimationEvent(Type type, | 22 AnimationEvent(Type type, |
| 21 int layer_id, | 23 int layer_id, |
| 22 int group_id, | 24 int group_id, |
| 23 TargetProperty::Type target_property, | 25 TargetProperty::Type target_property, |
| 24 base::TimeTicks monotonic_time); | 26 base::TimeTicks monotonic_time); |
| 27 |
| 25 AnimationEvent(const AnimationEvent& other); | 28 AnimationEvent(const AnimationEvent& other); |
| 29 AnimationEvent& operator=(const AnimationEvent& other); |
| 30 |
| 31 ~AnimationEvent(); |
| 26 | 32 |
| 27 Type type; | 33 Type type; |
| 28 int layer_id; | 34 int layer_id; |
| 29 int group_id; | 35 int group_id; |
| 30 TargetProperty::Type target_property; | 36 TargetProperty::Type target_property; |
| 31 base::TimeTicks monotonic_time; | 37 base::TimeTicks monotonic_time; |
| 32 bool is_impl_only; | 38 bool is_impl_only; |
| 33 float opacity; | 39 float opacity; |
| 34 gfx::Transform transform; | 40 gfx::Transform transform; |
| 35 FilterOperations filters; | 41 FilterOperations filters; |
| 42 |
| 43 // For continuing a scroll offset animation on the main thread. |
| 44 double animation_start_time; |
| 45 scoped_ptr<AnimationCurve> curve; |
| 36 }; | 46 }; |
| 37 | 47 |
| 38 class CC_EXPORT AnimationEvents { | 48 class CC_EXPORT AnimationEvents { |
| 39 public: | 49 public: |
| 40 AnimationEvents(); | 50 AnimationEvents(); |
| 41 ~AnimationEvents(); | 51 ~AnimationEvents(); |
| 42 | 52 |
| 43 std::vector<AnimationEvent> events_; | 53 std::vector<AnimationEvent> events_; |
| 44 }; | 54 }; |
| 45 | 55 |
| 46 } // namespace cc | 56 } // namespace cc |
| 47 | 57 |
| 48 #endif // CC_ANIMATION_ANIMATION_EVENTS_H_ | 58 #endif // CC_ANIMATION_ANIMATION_EVENTS_H_ |
| OLD | NEW |