[email protected] | 0fb2500 | 2012-10-12 07:20:02 | [diff] [blame] | 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 | ||||
3 | // found in the LICENSE file. | ||||
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 4 | |
[email protected] | 95e4e1a0 | 2013-03-18 07:09:09 | [diff] [blame] | 5 | #ifndef CC_ANIMATION_ANIMATION_EVENTS_H_ |
6 | #define CC_ANIMATION_ANIMATION_EVENTS_H_ | ||||
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 7 | |
danakj | 60bc3bc | 2016-04-09 00:24:48 | [diff] [blame] | 8 | #include <memory> |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 9 | #include <vector> |
10 | |||||
[email protected] | 95e4e1a0 | 2013-03-18 07:09:09 | [diff] [blame] | 11 | #include "cc/animation/animation.h" |
ymalik | 6581bb3e | 2016-03-01 07:32:07 | [diff] [blame] | 12 | #include "cc/animation/animation_curve.h" |
[email protected] | 79eb14f6 | 2013-04-11 18:59:17 | [diff] [blame] | 13 | #include "cc/base/cc_export.h" |
[email protected] | b4c6d81 | 2013-10-03 15:48:56 | [diff] [blame] | 14 | #include "cc/output/filter_operations.h" |
loyso | 7337a62 | 2016-04-26 23:54:30 | [diff] [blame] | 15 | #include "cc/trees/mutator_host_client.h" |
[email protected] | 590e12f | 2013-03-07 16:16:41 | [diff] [blame] | 16 | #include "ui/gfx/transform.h" |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 17 | |
18 | namespace cc { | ||||
19 | |||||
[email protected] | 79eb14f6 | 2013-04-11 18:59:17 | [diff] [blame] | 20 | struct CC_EXPORT AnimationEvent { |
ymalik | 6581bb3e | 2016-03-01 07:32:07 | [diff] [blame] | 21 | enum Type { STARTED, FINISHED, ABORTED, PROPERTY_UPDATE, TAKEOVER }; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 22 | |
[email protected] | cb67b82 | 2013-03-12 02:49:22 | [diff] [blame] | 23 | AnimationEvent(Type type, |
loyso | 7337a62 | 2016-04-26 23:54:30 | [diff] [blame] | 24 | ElementId element_id, |
[email protected] | cb67b82 | 2013-03-12 02:49:22 | [diff] [blame] | 25 | int group_id, |
loyso | 0c8e440 | 2016-02-25 04:12:30 | [diff] [blame] | 26 | TargetProperty::Type target_property, |
[email protected] | ac22516a | 2014-05-15 17:31:36 | [diff] [blame] | 27 | base::TimeTicks monotonic_time); |
ymalik | 6581bb3e | 2016-03-01 07:32:07 | [diff] [blame] | 28 | |
vmpstr | 6aaeb2e | 2016-02-25 01:55:38 | [diff] [blame] | 29 | AnimationEvent(const AnimationEvent& other); |
ymalik | 6581bb3e | 2016-03-01 07:32:07 | [diff] [blame] | 30 | AnimationEvent& operator=(const AnimationEvent& other); |
31 | |||||
32 | ~AnimationEvent(); | ||||
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 33 | |
[email protected] | cb67b82 | 2013-03-12 02:49:22 | [diff] [blame] | 34 | Type type; |
loyso | 7337a62 | 2016-04-26 23:54:30 | [diff] [blame] | 35 | ElementId element_id; |
[email protected] | cb67b82 | 2013-03-12 02:49:22 | [diff] [blame] | 36 | int group_id; |
loyso | 0c8e440 | 2016-02-25 04:12:30 | [diff] [blame] | 37 | TargetProperty::Type target_property; |
[email protected] | ac22516a | 2014-05-15 17:31:36 | [diff] [blame] | 38 | base::TimeTicks monotonic_time; |
[email protected] | 79eb14f6 | 2013-04-11 18:59:17 | [diff] [blame] | 39 | bool is_impl_only; |
[email protected] | cb67b82 | 2013-03-12 02:49:22 | [diff] [blame] | 40 | float opacity; |
41 | gfx::Transform transform; | ||||
[email protected] | b4c6d81 | 2013-10-03 15:48:56 | [diff] [blame] | 42 | FilterOperations filters; |
ymalik | 6581bb3e | 2016-03-01 07:32:07 | [diff] [blame] | 43 | |
44 | // For continuing a scroll offset animation on the main thread. | ||||
45 | double animation_start_time; | ||||
danakj | 60bc3bc | 2016-04-09 00:24:48 | [diff] [blame] | 46 | std::unique_ptr<AnimationCurve> curve; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 47 | }; |
48 | |||||
loyso | e926437dd | 2016-01-14 22:55:30 | [diff] [blame] | 49 | class CC_EXPORT AnimationEvents { |
50 | public: | ||||
51 | AnimationEvents(); | ||||
52 | ~AnimationEvents(); | ||||
53 | |||||
54 | std::vector<AnimationEvent> events_; | ||||
55 | }; | ||||
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 56 | |
57 | } // namespace cc | ||||
58 | |||||
[email protected] | 95e4e1a0 | 2013-03-18 07:09:09 | [diff] [blame] | 59 | #endif // CC_ANIMATION_ANIMATION_EVENTS_H_ |