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

Unified Diff: third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp

Issue 2186203002: [worklets] Add stub classes for window.animationWorklet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix webexposed. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp
similarity index 30%
copy from third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp
copy to third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp
index 323e79afff5f16ca42e50dc09d8f0ec0483a5b7f..46a51c43a37e1f3b457f4d05f83add231d88dc7f 100644
--- a/third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp
@@ -2,50 +2,39 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "modules/csspaint/PaintWorklet.h"
+#include "modules/compositorworker/AnimationWorklet.h"
#include "bindings/core/v8/V8Binding.h"
#include "core/dom/ExecutionContext.h"
-#include "modules/csspaint/PaintWorkletGlobalScope.h"
+#include "modules/worklet/ThreadedWorkletGlobalScopeProxy.h"
namespace blink {
// static
-PaintWorklet* PaintWorklet::create(LocalFrame* frame, ExecutionContext* executionContext)
+AnimationWorklet* AnimationWorklet::create(LocalFrame* frame, ExecutionContext* executionContext)
{
- PaintWorklet* worklet = new PaintWorklet(frame, executionContext);
+ AnimationWorklet* worklet = new AnimationWorklet(frame, executionContext);
worklet->suspendIfNeeded();
return worklet;
}
-PaintWorklet::PaintWorklet(LocalFrame* frame, ExecutionContext* executionContext)
+AnimationWorklet::AnimationWorklet(LocalFrame* frame, ExecutionContext* executionContext)
nhiroki 2016/07/28 06:13:53 |frame| is not necessary?
ikilpatrick 2016/07/28 20:57:04 Done.
: Worklet(executionContext)
- , m_paintWorkletGlobalScope(PaintWorkletGlobalScope::create(frame, executionContext->url(), executionContext->userAgent(), executionContext->getSecurityOrigin(), toIsolate(executionContext)))
+ , m_workletGlobalScopeProxy(new ThreadedWorkletGlobalScopeProxy())
{
}
-PaintWorklet::~PaintWorklet()
+AnimationWorklet::~AnimationWorklet()
{
}
-PaintWorkletGlobalScope* PaintWorklet::workletGlobalScopeProxy() const
+ThreadedWorkletGlobalScopeProxy* AnimationWorklet::workletGlobalScopeProxy() const
{
- return m_paintWorkletGlobalScope.get();
+ return m_workletGlobalScopeProxy.get();
}
-CSSPaintDefinition* PaintWorklet::findDefinition(const String& name)
+DEFINE_TRACE(AnimationWorklet)
{
- return m_paintWorkletGlobalScope->findDefinition(name);
-}
-
-void PaintWorklet::addPendingGenerator(const String& name, CSSPaintImageGeneratorImpl* generator)
-{
- return m_paintWorkletGlobalScope->addPendingGenerator(name, generator);
-}
-
-DEFINE_TRACE(PaintWorklet)
-{
- visitor->trace(m_paintWorkletGlobalScope);
Worklet::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698