OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef SKY_ENGINE_CORE_ANIMATION_ANIMATIONTIMELINE_H_ | 31 #ifndef SKY_ENGINE_CORE_ANIMATION_ANIMATIONTIMELINE_H_ |
32 #define SKY_ENGINE_CORE_ANIMATION_ANIMATIONTIMELINE_H_ | 32 #define SKY_ENGINE_CORE_ANIMATION_ANIMATIONTIMELINE_H_ |
33 | 33 |
34 #include "sky/engine/bindings/core/v8/ScriptWrappable.h" | 34 #include "sky/engine/tonic/dart_wrappable.h" |
35 #include "sky/engine/core/animation/AnimationEffect.h" | 35 #include "sky/engine/core/animation/AnimationEffect.h" |
36 #include "sky/engine/core/animation/AnimationPlayer.h" | 36 #include "sky/engine/core/animation/AnimationPlayer.h" |
37 #include "sky/engine/core/dom/Element.h" | 37 #include "sky/engine/core/dom/Element.h" |
38 #include "sky/engine/platform/Timer.h" | 38 #include "sky/engine/platform/Timer.h" |
39 #include "sky/engine/platform/heap/Handle.h" | 39 #include "sky/engine/platform/heap/Handle.h" |
40 #include "sky/engine/wtf/RefCounted.h" | 40 #include "sky/engine/wtf/RefCounted.h" |
41 #include "sky/engine/wtf/RefPtr.h" | 41 #include "sky/engine/wtf/RefPtr.h" |
42 #include "sky/engine/wtf/Vector.h" | 42 #include "sky/engine/wtf/Vector.h" |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 class Document; | 46 class Document; |
47 class AnimationNode; | 47 class AnimationNode; |
48 | 48 |
49 // AnimationTimeline is constructed and owned by Document, and tied to its lifec
ycle. | 49 // AnimationTimeline is constructed and owned by Document, and tied to its lifec
ycle. |
50 class AnimationTimeline : public RefCounted<AnimationTimeline>, public ScriptWra
ppable { | 50 class AnimationTimeline : public RefCounted<AnimationTimeline>, public DartWrapp
able { |
51 DEFINE_WRAPPERTYPEINFO(); | 51 DEFINE_WRAPPERTYPEINFO(); |
52 public: | 52 public: |
53 class PlatformTiming { | 53 class PlatformTiming { |
54 | 54 |
55 public: | 55 public: |
56 // Calls AnimationTimeline's wake() method after duration seconds. | 56 // Calls AnimationTimeline's wake() method after duration seconds. |
57 virtual void wakeAfter(double duration) = 0; | 57 virtual void wakeAfter(double duration) = 0; |
58 virtual void cancelWake() = 0; | 58 virtual void cancelWake() = 0; |
59 virtual void serviceOnNextFrame() = 0; | 59 virtual void serviceOnNextFrame() = 0; |
60 virtual ~PlatformTiming() { } | 60 virtual ~PlatformTiming() { } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 RawPtr<AnimationTimeline> m_timeline; | 130 RawPtr<AnimationTimeline> m_timeline; |
131 Timer<AnimationTimelineTiming> m_timer; | 131 Timer<AnimationTimelineTiming> m_timer; |
132 }; | 132 }; |
133 | 133 |
134 friend class AnimationAnimationTimelineTest; | 134 friend class AnimationAnimationTimelineTest; |
135 }; | 135 }; |
136 | 136 |
137 } // namespace blink | 137 } // namespace blink |
138 | 138 |
139 #endif // SKY_ENGINE_CORE_ANIMATION_ANIMATIONTIMELINE_H_ | 139 #endif // SKY_ENGINE_CORE_ANIMATION_ANIMATIONTIMELINE_H_ |
OLD | NEW |