Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(820)

Side by Side Diff: cc/animation/animation_events.h

Issue 2506093003: CC Animation: Make cc/animation an independent GN component. (Closed)
Patch Set: Rebase. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/animation/animation_delegate.h ('k') | cc/animation/animation_export.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "cc/animation/animation.h" 11 #include "cc/animation/animation.h"
12 #include "cc/animation/animation_curve.h" 12 #include "cc/animation/animation_curve.h"
13 #include "cc/base/cc_export.h" 13 #include "cc/animation/animation_export.h"
14 #include "cc/output/filter_operations.h" 14 #include "cc/output/filter_operations.h"
15 #include "cc/trees/element_id.h" 15 #include "cc/trees/element_id.h"
16 #include "cc/trees/mutator_host.h" 16 #include "cc/trees/mutator_host.h"
17 #include "ui/gfx/transform.h" 17 #include "ui/gfx/transform.h"
18 18
19 namespace cc { 19 namespace cc {
20 20
21 struct CC_EXPORT AnimationEvent { 21 struct CC_ANIMATION_EXPORT AnimationEvent {
22 enum Type { STARTED, FINISHED, ABORTED, PROPERTY_UPDATE, TAKEOVER }; 22 enum Type { STARTED, FINISHED, ABORTED, PROPERTY_UPDATE, TAKEOVER };
23 23
24 AnimationEvent(Type type, 24 AnimationEvent(Type type,
25 ElementId element_id, 25 ElementId element_id,
26 int group_id, 26 int group_id,
27 TargetProperty::Type target_property, 27 TargetProperty::Type target_property,
28 base::TimeTicks monotonic_time); 28 base::TimeTicks monotonic_time);
29 29
30 AnimationEvent(const AnimationEvent& other); 30 AnimationEvent(const AnimationEvent& other);
31 AnimationEvent& operator=(const AnimationEvent& other); 31 AnimationEvent& operator=(const AnimationEvent& other);
32 32
33 ~AnimationEvent(); 33 ~AnimationEvent();
34 34
35 Type type; 35 Type type;
36 ElementId element_id; 36 ElementId element_id;
37 int group_id; 37 int group_id;
38 TargetProperty::Type target_property; 38 TargetProperty::Type target_property;
39 base::TimeTicks monotonic_time; 39 base::TimeTicks monotonic_time;
40 bool is_impl_only; 40 bool is_impl_only;
41 float opacity; 41 float opacity;
42 gfx::Transform transform; 42 gfx::Transform transform;
43 FilterOperations filters; 43 FilterOperations filters;
44 44
45 // For continuing a scroll offset animation on the main thread. 45 // For continuing a scroll offset animation on the main thread.
46 double animation_start_time; 46 double animation_start_time;
47 std::unique_ptr<AnimationCurve> curve; 47 std::unique_ptr<AnimationCurve> curve;
48 }; 48 };
49 49
50 class CC_EXPORT AnimationEvents : public NON_EXPORTED_BASE(MutatorEvents) { 50 class CC_ANIMATION_EXPORT AnimationEvents
51 : public NON_EXPORTED_BASE(MutatorEvents) {
51 public: 52 public:
52 AnimationEvents(); 53 AnimationEvents();
53 54
54 // MutatorEvents implementation. 55 // MutatorEvents implementation.
55 ~AnimationEvents() override; 56 ~AnimationEvents() override;
56 bool IsEmpty() const override; 57 bool IsEmpty() const override;
57 58
58 std::vector<AnimationEvent> events_; 59 std::vector<AnimationEvent> events_;
59 }; 60 };
60 61
61 } // namespace cc 62 } // namespace cc
62 63
63 #endif // CC_ANIMATION_ANIMATION_EVENTS_H_ 64 #endif // CC_ANIMATION_ANIMATION_EVENTS_H_
OLDNEW
« no previous file with comments | « cc/animation/animation_delegate.h ('k') | cc/animation/animation_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698