Index: third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp |
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..488257ca1875449dc02abf49e131a07faa6ff1d4 |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp |
@@ -0,0 +1,41 @@ |
+// Copyright 2016 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/AnimationWorklet.h" |
+ |
+#include "bindings/core/v8/V8Binding.h" |
+#include "core/dom/ExecutionContext.h" |
+#include "modules/worklet/ThreadedWorkletGlobalScopeProxy.h" |
+ |
+namespace blink { |
+ |
+// static |
+AnimationWorklet* AnimationWorklet::create(ExecutionContext* executionContext) |
+{ |
+ AnimationWorklet* worklet = new AnimationWorklet(executionContext); |
+ worklet->suspendIfNeeded(); |
+ return worklet; |
+} |
+ |
+AnimationWorklet::AnimationWorklet(ExecutionContext* executionContext) |
+ : Worklet(executionContext) |
+ , m_workletGlobalScopeProxy(new ThreadedWorkletGlobalScopeProxy()) |
+{ |
+} |
+ |
+AnimationWorklet::~AnimationWorklet() |
+{ |
+} |
+ |
+WorkletGlobalScopeProxy* AnimationWorklet::workletGlobalScopeProxy() const |
+{ |
+ return m_workletGlobalScopeProxy.get(); |
+} |
+ |
+DEFINE_TRACE(AnimationWorklet) |
+{ |
+ Worklet::trace(visitor); |
+} |
+ |
+} // namespace blink |