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

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

Issue 2840523002: [DONT COMMIT] Worklet: Implement "addModule()" algorithm for main thread worklets (Closed)
Patch Set: rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/workers/MainThreadWorklet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 de5853b093bb05442a58c6c296fec91e41c83e93..15a501541c951f19b05f16e411b9cf1be41f6591 100644
--- a/third_party/WebKit/Source/core/workers/MainThreadWorklet.h
+++ b/third_party/WebKit/Source/core/workers/MainThreadWorklet.h
@@ -14,6 +14,7 @@
namespace blink {
class LocalFrame;
+class WorkletGlobalScopeProxy;
// A MainThreadWorklet is a worklet that runs only on the main thread.
// TODO(nhiroki): This is a temporary class to support module loading for main
@@ -36,6 +37,15 @@ class CORE_EXPORT MainThreadWorklet : public Worklet {
protected:
explicit MainThreadWorklet(LocalFrame*);
+
+ // Instantiates WorkletGlobalScope and adds it into |global_scope_proxies_| if
+ // there are no global scopes or additional global scopes are necessary.
+ virtual void MayAddWorkletGlobalScopes() = 0;
+
+ // "A Worklet has a list of the worklet's WorkletGlobalScopes. Initially this
+ // list is empty; it is populated when the user agent chooses to create its
+ // WorkletGlobalScope."
+ WTF::HashSet<std::unique_ptr<WorkletGlobalScopeProxy>> global_scope_proxies_;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/workers/MainThreadWorklet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698