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

Unified Diff: third_party/WebKit/Source/core/workers/Worklet.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/Worklet.h
diff --git a/third_party/WebKit/Source/core/workers/Worklet.h b/third_party/WebKit/Source/core/workers/Worklet.h
index 2131acfd639fe9f089037c837c9d7ed7b3acf2fd..9d9ba852c2bf01617552c7b72d4a191b83de5e86 100644
--- a/third_party/WebKit/Source/core/workers/Worklet.h
+++ b/third_party/WebKit/Source/core/workers/Worklet.h
@@ -14,6 +14,7 @@
namespace blink {
class LocalFrame;
+class ScriptPromiseResolver;
class WorkletGlobalScopeProxy;
// This is the base implementation of Worklet interface defined in the spec:
@@ -32,21 +33,20 @@ class CORE_EXPORT Worklet : public GarbageCollectedFinalized<Worklet>,
// Worklet.idl
// addModule() imports ES6 module scripts.
- virtual ScriptPromise addModule(ScriptState*, const String& module_url) = 0;
+ virtual ScriptPromise addModule(ScriptState*, const String& module_url);
// Returns a proxy to WorkletGlobalScope on the context thread.
virtual WorkletGlobalScopeProxy* GetWorkletGlobalScopeProxy() const = 0;
- // ContextLifecycleObserver
- virtual void ContextDestroyed(ExecutionContext*);
-
DECLARE_VIRTUAL_TRACE();
protected:
// The Worklet inherits the url and userAgent from the frame->document().
explicit Worklet(LocalFrame*);
- Member<LocalFrame> frame_;
+ private:
+ virtual void FetchAndInvokeScript(const KURL& module_url_record,
+ ScriptPromiseResolver*) = 0;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/workers/ThreadedWorklet.cpp ('k') | third_party/WebKit/Source/core/workers/Worklet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698