Chromium Code Reviews| Index: third_party/WebKit/Source/modules/compositorworker/AnimatorDefinition.cpp |
| diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimatorDefinition.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimatorDefinition.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7ee9f404344ae57489d8760e2969fc8da3b5071f |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/compositorworker/AnimatorDefinition.cpp |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "modules/compositorworker/AnimatorDefinition.h" |
| + |
| +#include "core/dom/ExecutionContext.h" |
| +#include "modules/compositorworker/Animator.h" |
| +#include "platform/bindings/ScriptState.h" |
| +#include "platform/bindings/V8Binding.h" |
| +#include "platform/bindings/V8ObjectConstructor.h" |
| + |
| +namespace blink { |
| + |
| +AnimatorDefinition* AnimatorDefinition::Create( |
| + v8::Isolate* isolate, |
| + v8::Local<v8::Function> constructor, |
| + v8::Local<v8::Function> animate) { |
| + return new AnimatorDefinition(isolate, constructor, animate); |
|
nhiroki
2017/05/22 00:20:20
Ditto: How about removing this factory function?
majidvp
2017/05/24 14:24:16
Done.
|
| +} |
| + |
| +AnimatorDefinition::AnimatorDefinition(v8::Isolate* isolate, |
| + v8::Local<v8::Function> constructor, |
| + v8::Local<v8::Function> animate) |
| + : m_constructor(isolate, constructor), m_animate(isolate, animate) {} |
| + |
| +AnimatorDefinition::~AnimatorDefinition() {} |
| + |
| +v8::Local<v8::Function> AnimatorDefinition::ConstructorLocal( |
| + v8::Isolate* isolate) { |
| + return m_constructor.NewLocal(isolate); |
| +} |
| + |
| +} // namespace blink |