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

Unified Diff: third_party/WebKit/Source/core/workers/MainThreadWorklet.h

Issue 2830603003: Worklet: Move WorkletScriptLoader from MainThreadWorklet to MainThreadWorkletGlobalScope (Closed)
Patch Set: const auto& 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/workers/MainThreadWorklet.h
diff --git a/third_party/WebKit/Source/core/workers/MainThreadWorklet.h b/third_party/WebKit/Source/core/workers/MainThreadWorklet.h
index 67e8186a3230f697e6681151b3248a17cad4c84c..07845f3601f7382c8013ed505257f37221a63060 100644
--- a/third_party/WebKit/Source/core/workers/MainThreadWorklet.h
+++ b/third_party/WebKit/Source/core/workers/MainThreadWorklet.h
@@ -9,7 +9,7 @@
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "core/CoreExport.h"
-#include "core/loader/WorkletScriptLoader.h"
+#include "core/workers/WorkletObjectProxy.h"
#include "platform/heap/Handle.h"
namespace blink {
@@ -21,7 +21,7 @@ class LocalFrame;
// thread worklets. This and ThreadedWorklet will be merged into the base
// Worklet class once threaded worklets are ready to use module loading.
class CORE_EXPORT MainThreadWorklet : public Worklet,
- public WorkletScriptLoader::Client {
+ public WorkletObjectProxy {
USING_GARBAGE_COLLECTED_MIXIN(MainThreadWorklet);
WTF_MAKE_NONCOPYABLE(MainThreadWorklet);
@@ -31,21 +31,20 @@ class CORE_EXPORT MainThreadWorklet : public Worklet,
// Worklet
ScriptPromise addModule(ScriptState*, const String& url) final;
- // WorkletScriptLoader::Client
- void NotifyWorkletScriptLoadingFinished(WorkletScriptLoader*,
- const ScriptSourceCode&) final;
-
// ContextLifecycleObserver
void ContextDestroyed(ExecutionContext*) final;
+ // WorkletObjectProxy
+ void DidFetchAndInvokeScript(int32_t request_id, bool success) final;
+
DECLARE_VIRTUAL_TRACE();
protected:
explicit MainThreadWorklet(LocalFrame*);
private:
- HeapHashMap<Member<WorkletScriptLoader>, Member<ScriptPromiseResolver>>
- loader_to_resolver_map_;
+ HeapHashMap<int32_t /* request_id */, Member<ScriptPromiseResolver>>
+ resolver_map_;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/workers/BUILD.gn ('k') | third_party/WebKit/Source/core/workers/MainThreadWorklet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698