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/modules/worklet/Worklet.h

Issue 1818223002: Introduce PaintWorkletGlobalScope, rename renderWorklet attribute to paintWorklet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix interface listing order. Created 4 years, 9 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/worklet/Worklet.h
diff --git a/third_party/WebKit/Source/modules/worklet/Worklet.h b/third_party/WebKit/Source/modules/worklet/Worklet.h
index 5fda2978ac72ae3821c1fd23008edc176ec6c303..2523d28d3b9f36b6345a4c7b666ac365f5f16acc 100644
--- a/third_party/WebKit/Source/modules/worklet/Worklet.h
+++ b/third_party/WebKit/Source/modules/worklet/Worklet.h
@@ -19,29 +19,30 @@ class ExecutionContext;
class ScriptPromiseResolver;
class WorkerScriptLoader;
-class Worklet final : public GarbageCollectedFinalized<Worklet>, public ScriptWrappable, public ActiveDOMObject {
+class Worklet : public GarbageCollectedFinalized<Worklet>, public ScriptWrappable, public ActiveDOMObject {
DEFINE_WRAPPERTYPEINFO();
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Worklet);
WTF_MAKE_NONCOPYABLE(Worklet);
public:
- // The ExecutionContext argument is the parent document of the Worklet. The
- // Worklet inherits the url and userAgent, from the document.
- static Worklet* create(LocalFrame*, ExecutionContext*);
+ virtual WorkletGlobalScope* workletGlobalScope() const = 0;
+ // Worklet
ScriptPromise import(ScriptState*, const String& url);
// ActiveDOMObject
void stop() final;
- DECLARE_TRACE();
+ DECLARE_VIRTUAL_TRACE();
-private:
- Worklet(LocalFrame*, ExecutionContext*);
+protected:
+ // The ExecutionContext argument is the parent document of the Worklet. The
+ // Worklet inherits the url and userAgent from the document.
+ explicit Worklet(ExecutionContext*);
+private:
void onResponse();
void onFinished(WorkerScriptLoader*, ScriptPromiseResolver*);
- RefPtrWillBeMember<WorkletGlobalScope> m_workletGlobalScope;
Vector<RefPtr<WorkerScriptLoader>> m_scriptLoaders;
HeapVector<Member<ScriptPromiseResolver>> m_resolvers;
};
« no previous file with comments | « third_party/WebKit/Source/modules/worklet/WindowWorklet.idl ('k') | third_party/WebKit/Source/modules/worklet/Worklet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698