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

Side by Side Diff: third_party/WebKit/Source/core/animation/KeyframeEffect.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 /* 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 22 matching lines...) Expand all
33 33
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "core/animation/AnimationEffectTiming.h" 35 #include "core/animation/AnimationEffectTiming.h"
36 #include "core/animation/EffectModel.h" 36 #include "core/animation/EffectModel.h"
37 #include "core/animation/KeyframeEffectReadOnly.h" 37 #include "core/animation/KeyframeEffectReadOnly.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class Element; 41 class Element;
42 class ExceptionState; 42 class ExceptionState;
43 class KeyframeEffectOptions; 43 class UnrestrictedDoubleOrKeyframeEffectOptions;
44 44
45 // Represents the effect of an Animation on an Element's properties. 45 // Represents the effect of an Animation on an Element's properties.
46 // http://w3c.github.io/web-animations/#keyframe-effect 46 // http://w3c.github.io/web-animations/#keyframe-effect
47 class CORE_EXPORT KeyframeEffect final : public KeyframeEffectReadOnly { 47 class CORE_EXPORT KeyframeEffect final : public KeyframeEffectReadOnly {
48 DEFINE_WRAPPERTYPEINFO(); 48 DEFINE_WRAPPERTYPEINFO();
49 49
50 public: 50 public:
51 static KeyframeEffect* Create(Element*, 51 static KeyframeEffect* Create(Element*,
52 EffectModel*, 52 EffectModel*,
53 const Timing&, 53 const Timing&,
54 KeyframeEffectReadOnly::Priority = 54 KeyframeEffectReadOnly::Priority =
55 KeyframeEffectReadOnly::kDefaultPriority, 55 KeyframeEffectReadOnly::kDefaultPriority,
56 EventDelegate* = nullptr); 56 EventDelegate* = nullptr);
57 // Web Animations API Bindings constructors. 57 // Web Animations API Bindings constructors.
58 static KeyframeEffect* Create( 58 static KeyframeEffect* Create(
59 ExecutionContext*, 59 ExecutionContext*,
60 Element*, 60 Element*,
61 const DictionarySequenceOrDictionary& effect_input, 61 const DictionarySequenceOrDictionary& effect_input,
62 double duration, 62 const UnrestrictedDoubleOrKeyframeEffectOptions&,
63 ExceptionState&); 63 ExceptionState&);
64 static KeyframeEffect* Create( 64 static KeyframeEffect* Create(
65 ExecutionContext*, 65 ExecutionContext*,
66 Element*,
67 const DictionarySequenceOrDictionary& effect_input,
68 const KeyframeEffectOptions& timing_input,
69 ExceptionState&);
70 static KeyframeEffect* Create(
71 ExecutionContext*,
72 Element*, 66 Element*,
73 const DictionarySequenceOrDictionary& effect_input, 67 const DictionarySequenceOrDictionary& effect_input,
74 ExceptionState&); 68 ExceptionState&);
75 69
76 ~KeyframeEffect() override; 70 ~KeyframeEffect() override;
77 71
78 bool IsKeyframeEffect() const override { return true; } 72 bool IsKeyframeEffect() const override { return true; }
79 73
80 AnimationEffectTiming* timing() override; 74 AnimationEffectTiming* timing() override;
81 75
82 private: 76 private:
83 KeyframeEffect(Element*, 77 KeyframeEffect(Element*,
84 EffectModel*, 78 EffectModel*,
85 const Timing&, 79 const Timing&,
86 KeyframeEffectReadOnly::Priority, 80 KeyframeEffectReadOnly::Priority,
87 EventDelegate*); 81 EventDelegate*);
88 }; 82 };
89 83
90 DEFINE_TYPE_CASTS(KeyframeEffect, 84 DEFINE_TYPE_CASTS(KeyframeEffect,
91 AnimationEffectReadOnly, 85 AnimationEffectReadOnly,
92 animationNode, 86 animationNode,
93 animationNode->IsKeyframeEffect(), 87 animationNode->IsKeyframeEffect(),
94 animationNode.IsKeyframeEffect()); 88 animationNode.IsKeyframeEffect());
95 89
96 } // namespace blink 90 } // namespace blink
97 91
98 #endif // KeyframeEffect_h 92 #endif // KeyframeEffect_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698