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

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

Issue 2878833002: Worklet: Move common code of addModule from Main/ThreadedWorklet to Worklet (Closed)
Patch Set: fix crashes Created 3 years, 7 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/ThreadedWorklet.h
diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorklet.h b/third_party/WebKit/Source/core/workers/ThreadedWorklet.h
index c238fbf2d12f3efd6fc69ab936c4b6ce4bf54565..075a9e4fca06c0eaa75852a4a3fe302d37c78b0f 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedWorklet.h
+++ b/third_party/WebKit/Source/core/workers/ThreadedWorklet.h
@@ -29,13 +29,6 @@ class CORE_EXPORT ThreadedWorklet : public Worklet,
public:
virtual ~ThreadedWorklet() = default;
- // Called when addModule() is called for the first time.
- virtual void Initialize() = 0;
- virtual bool IsInitialized() const = 0;
-
- // Worklet
- ScriptPromise addModule(ScriptState*, const String& module_url) final;
-
// WorkletScriptLoader::Client
void NotifyWorkletScriptLoadingFinished(WorkletScriptLoader*,
const ScriptSourceCode&) final;
@@ -49,6 +42,16 @@ class CORE_EXPORT ThreadedWorklet : public Worklet,
explicit ThreadedWorklet(LocalFrame*);
private:
+ // Worklet
+ void FetchAndInvokeScript(const KURL& module_url_record,
+ ScriptPromiseResolver*) override;
+
+ // Called when addModule() is called for the first time.
+ virtual void Initialize() = 0;
+ virtual bool IsInitialized() const = 0;
+
+ Member<LocalFrame> frame_;
+
HeapHashMap<Member<WorkletScriptLoader>, Member<ScriptPromiseResolver>>
loader_to_resolver_map_;
};

Powered by Google App Engine
This is Rietveld 408576698