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 KeyframeEffectOptions; | 14 class KeyframeEffectOptions; |
15 class DictionarySequenceOrDictionary; | 15 class DictionarySequenceOrDictionary; |
16 class Element; | 16 class Element; |
17 class ExceptionState; | 17 class ExceptionState; |
18 class ExecutionContext; | 18 class ExecutionContext; |
19 class SampledEffect; | 19 class SampledEffect; |
20 | 20 |
21 // Represents the effect of an Animation on an Element's properties. | 21 // Represents the effect of an Animation on an Element's properties. |
22 // http://w3c.github.io/web-animations/#the-keyframeeffect-interfaces | 22 // http://w3c.github.io/web-animations/#the-keyframeeffect-interfaces |
23 class CORE_EXPORT KeyframeEffectReadOnly : public AnimationEffectReadOnly { | 23 class CORE_EXPORT KeyframeEffectReadOnly : public AnimationEffectReadOnly { |
24 DEFINE_WRAPPERTYPEINFO(); | 24 DEFINE_WRAPPERTYPEINFO(); |
25 | 25 |
26 public: | 26 public: |
| 27 enum Priority { DefaultPriority, TransitionPriority }; |
| 28 |
27 static KeyframeEffectReadOnly* create( | 29 static KeyframeEffectReadOnly* create( |
28 ExecutionContext*, | 30 ExecutionContext*, |
29 Element*, | 31 Element*, |
30 const DictionarySequenceOrDictionary& effectInput, | 32 const DictionarySequenceOrDictionary& effectInput, |
31 double duration, | 33 double duration, |
32 ExceptionState&); | 34 ExceptionState&); |
33 static KeyframeEffectReadOnly* create( | 35 static KeyframeEffectReadOnly* create( |
34 ExecutionContext*, | 36 ExecutionContext*, |
35 Element*, | 37 Element*, |
36 const DictionarySequenceOrDictionary& effectInput, | 38 const DictionarySequenceOrDictionary& effectInput, |
37 const KeyframeEffectOptions& timingInput, | 39 const KeyframeEffectOptions& timingInput, |
38 ExceptionState&); | 40 ExceptionState&); |
39 static KeyframeEffectReadOnly* create( | 41 static KeyframeEffectReadOnly* create( |
40 ExecutionContext*, | 42 ExecutionContext*, |
41 Element*, | 43 Element*, |
42 const DictionarySequenceOrDictionary& effectInput, | 44 const DictionarySequenceOrDictionary& effectInput, |
43 ExceptionState&); | 45 ExceptionState&); |
44 | 46 |
45 ~KeyframeEffectReadOnly() override {} | 47 ~KeyframeEffectReadOnly() override {} |
46 | 48 |
| 49 Priority getPriority() const { return m_priority; } |
| 50 void downgradeToNormal() { m_priority = DefaultPriority; } |
| 51 |
47 DECLARE_VIRTUAL_TRACE(); | 52 DECLARE_VIRTUAL_TRACE(); |
48 | 53 |
49 protected: | 54 protected: |
50 KeyframeEffectReadOnly(Element*, EffectModel*, const Timing&, EventDelegate*); | 55 KeyframeEffectReadOnly(Element*, |
| 56 EffectModel*, |
| 57 const Timing&, |
| 58 Priority, |
| 59 EventDelegate*); |
51 | 60 |
52 Member<Element> m_target; | 61 Member<Element> m_target; |
53 Member<EffectModel> m_model; | 62 Member<EffectModel> m_model; |
54 Member<SampledEffect> m_sampledEffect; | 63 Member<SampledEffect> m_sampledEffect; |
| 64 |
| 65 Priority m_priority; |
55 }; | 66 }; |
56 | 67 |
57 } // namespace blink | 68 } // namespace blink |
58 | 69 |
59 #endif // KeyframeEffectReadOnly_h | 70 #endif // KeyframeEffectReadOnly_h |
OLD | NEW |