OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 KeyframeEffectReadOnly_h | 5 #ifndef KeyframeEffectReadOnly_h |
6 #define KeyframeEffectReadOnly_h | 6 #define KeyframeEffectReadOnly_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/animation/AnimationEffectReadOnly.h" | 9 #include "core/animation/AnimationEffectReadOnly.h" |
10 #include "core/animation/EffectModel.h" | 10 #include "core/animation/EffectModel.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class DictionarySequenceOrDictionary; | 14 class DictionarySequenceOrDictionary; |
15 class Element; | 15 class Element; |
16 class ExceptionState; | 16 class ExceptionState; |
17 class ExecutionContext; | 17 class ExecutionContext; |
18 class KeyframeEffectOptions; | 18 class KeyframeEffectOptions; |
19 class PropertyHandle; | 19 class PropertyHandle; |
20 class SampledEffect; | 20 class SampledEffect; |
21 | 21 |
22 // Represents the effect of an Animation on an Element's properties. | 22 // Represents the effect of an Animation on an Element's properties. |
23 // http://w3c.github.io/web-animations/#the-keyframeeffect-interfaces | 23 // http://w3c.github.io/web-animations/#the-keyframeeffect-interfaces |
24 class CORE_EXPORT KeyframeEffectReadOnly : public AnimationEffectReadOnly { | 24 class CORE_EXPORT KeyframeEffectReadOnly : public AnimationEffectReadOnly { |
25 DEFINE_WRAPPERTYPEINFO(); | 25 DEFINE_WRAPPERTYPEINFO(); |
26 | 26 |
27 public: | 27 public: |
28 enum Priority { DefaultPriority, TransitionPriority }; | 28 enum Priority { DefaultPriority, TransitionPriority }; |
29 | 29 |
| 30 static KeyframeEffectReadOnly* create(Element*, |
| 31 EffectModel*, |
| 32 const Timing&, |
| 33 Priority = DefaultPriority, |
| 34 EventDelegate* = nullptr); |
| 35 // Web Animations API Bindings constructors. |
30 static KeyframeEffectReadOnly* create( | 36 static KeyframeEffectReadOnly* create( |
31 ExecutionContext*, | 37 ExecutionContext*, |
32 Element*, | 38 Element*, |
33 const DictionarySequenceOrDictionary& effectInput, | 39 const DictionarySequenceOrDictionary& effectInput, |
34 double duration, | 40 double duration, |
35 ExceptionState&); | 41 ExceptionState&); |
36 static KeyframeEffectReadOnly* create( | 42 static KeyframeEffectReadOnly* create( |
37 ExecutionContext*, | 43 ExecutionContext*, |
38 Element*, | 44 Element*, |
39 const DictionarySequenceOrDictionary& effectInput, | 45 const DictionarySequenceOrDictionary& effectInput, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 private: | 110 private: |
105 Member<Element> m_target; | 111 Member<Element> m_target; |
106 Member<EffectModel> m_model; | 112 Member<EffectModel> m_model; |
107 Member<SampledEffect> m_sampledEffect; | 113 Member<SampledEffect> m_sampledEffect; |
108 | 114 |
109 Priority m_priority; | 115 Priority m_priority; |
110 | 116 |
111 Vector<int> m_compositorAnimationIds; | 117 Vector<int> m_compositorAnimationIds; |
112 }; | 118 }; |
113 | 119 |
114 // TODO(suzyh): Replace calls to toKeyframeEffect with toKeyframeEffectReadOnly | |
115 // where possible | |
116 DEFINE_TYPE_CASTS(KeyframeEffectReadOnly, | 120 DEFINE_TYPE_CASTS(KeyframeEffectReadOnly, |
117 AnimationEffectReadOnly, | 121 AnimationEffectReadOnly, |
118 animationNode, | 122 animationNode, |
119 animationNode->isKeyframeEffectReadOnly(), | 123 animationNode->isKeyframeEffectReadOnly(), |
120 animationNode.isKeyframeEffectReadOnly()); | 124 animationNode.isKeyframeEffectReadOnly()); |
121 | 125 |
122 } // namespace blink | 126 } // namespace blink |
123 | 127 |
124 #endif // KeyframeEffectReadOnly_h | 128 #endif // KeyframeEffectReadOnly_h |
OLD | NEW |