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

Side by Side Diff: third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.h

Issue 2814523002: Web Animations: Coalesce constructors where possible. (Closed)
Patch Set: Rebase Created 3 years, 8 months 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
OLDNEW
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;
19 class PropertyHandle; 18 class PropertyHandle;
20 class SampledEffect; 19 class SampledEffect;
20 class UnrestrictedDoubleOrKeyframeEffectOptions;
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 { kDefaultPriority, kTransitionPriority }; 28 enum Priority { kDefaultPriority, kTransitionPriority };
29 29
30 static KeyframeEffectReadOnly* Create(Element*, 30 static KeyframeEffectReadOnly* Create(Element*,
31 EffectModel*, 31 EffectModel*,
32 const Timing&, 32 const Timing&,
33 Priority = kDefaultPriority, 33 Priority = kDefaultPriority,
34 EventDelegate* = nullptr); 34 EventDelegate* = nullptr);
35 // Web Animations API Bindings constructors. 35 // Web Animations API Bindings constructors.
36 static KeyframeEffectReadOnly* Create( 36 static KeyframeEffectReadOnly* Create(
37 ExecutionContext*, 37 ExecutionContext*,
38 Element*, 38 Element*,
39 const DictionarySequenceOrDictionary& effect_input, 39 const DictionarySequenceOrDictionary& effect_input,
40 double duration, 40 const UnrestrictedDoubleOrKeyframeEffectOptions&,
41 ExceptionState&); 41 ExceptionState&);
42 static KeyframeEffectReadOnly* Create( 42 static KeyframeEffectReadOnly* Create(
43 ExecutionContext*, 43 ExecutionContext*,
44 Element*,
45 const DictionarySequenceOrDictionary& effect_input,
46 const KeyframeEffectOptions& timing_input,
47 ExceptionState&);
48 static KeyframeEffectReadOnly* Create(
49 ExecutionContext*,
50 Element*, 44 Element*,
51 const DictionarySequenceOrDictionary& effect_input, 45 const DictionarySequenceOrDictionary& effect_input,
52 ExceptionState&); 46 ExceptionState&);
53 47
54 ~KeyframeEffectReadOnly() override {} 48 ~KeyframeEffectReadOnly() override {}
55 49
56 bool IsKeyframeEffectReadOnly() const override { return true; } 50 bool IsKeyframeEffectReadOnly() const override { return true; }
57 51
58 bool Affects(const PropertyHandle&) const; 52 bool Affects(const PropertyHandle&) const;
59 const EffectModel* Model() const { return model_.Get(); } 53 const EffectModel* Model() const { return model_.Get(); }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 115
122 DEFINE_TYPE_CASTS(KeyframeEffectReadOnly, 116 DEFINE_TYPE_CASTS(KeyframeEffectReadOnly,
123 AnimationEffectReadOnly, 117 AnimationEffectReadOnly,
124 animationNode, 118 animationNode,
125 animationNode->IsKeyframeEffectReadOnly(), 119 animationNode->IsKeyframeEffectReadOnly(),
126 animationNode.IsKeyframeEffectReadOnly()); 120 animationNode.IsKeyframeEffectReadOnly());
127 121
128 } // namespace blink 122 } // namespace blink
129 123
130 #endif // KeyframeEffectReadOnly_h 124 #endif // KeyframeEffectReadOnly_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698