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

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

Issue 2513413003: Worker: Provide a way to access parent frame task runners from a worker thread (Closed)
Patch Set: update comments Created 4 years, 1 month 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/AnimationWorkletThreadTest.cpp
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp
index f42cfe499a05d5c072bd6274a801ea138432432e..4c7fe4e707d07dd99722671e1146dbae673a2bb2 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp
@@ -10,6 +10,7 @@
#include "bindings/core/v8/WorkerOrWorkletScriptController.h"
#include "core/inspector/ConsoleMessage.h"
#include "core/workers/InProcessWorkerObjectProxy.h"
+#include "core/workers/ParentFrameTaskRunners.h"
#include "core/workers/WorkerBackingThread.h"
#include "core/workers/WorkerLoaderProxy.h"
#include "core/workers/WorkerOrWorkletGlobalScope.h"
@@ -45,6 +46,9 @@ class TestAnimationWorkletReportingProxy : public WorkerReportingProxy {
const String& message,
SourceLocation*) override {}
void postMessageToPageInspector(const String&) override {}
+ ParentFrameTaskRunners* getParentFrameTaskRunners() override {
+ return m_parentFrameTaskRunners.get();
+ }
void didEvaluateWorkerScript(bool success) override {}
void didCloseWorkerGlobalScope() override {}
@@ -52,7 +56,10 @@ class TestAnimationWorkletReportingProxy : public WorkerReportingProxy {
void didTerminateWorkerThread() override {}
private:
- TestAnimationWorkletReportingProxy() {}
+ TestAnimationWorkletReportingProxy()
+ : m_parentFrameTaskRunners(ParentFrameTaskRunners::create(nullptr)) {}
+
+ Persistent<ParentFrameTaskRunners> m_parentFrameTaskRunners;
};
class AnimationWorkletTestPlatform : public TestingPlatformSupport {

Powered by Google App Engine
This is Rietveld 408576698