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

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: 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 07845f3601f7382c8013ed505257f37221a63060..76d8634909ed0dd2cb350a432354197068b5c3a6 100644
--- a/third_party/WebKit/Source/core/workers/MainThreadWorklet.h
+++ b/third_party/WebKit/Source/core/workers/MainThreadWorklet.h
@@ -15,6 +15,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
@@ -42,9 +43,18 @@ class CORE_EXPORT MainThreadWorklet : public Worklet,
protected:
explicit MainThreadWorklet(LocalFrame*);
+ virtual void CreateWorkletGlobalScope();
+
+ // "A Worklet has a list of the worklet's WorkletGlobalScopes. Initially this
kouhei (in TOK) 2017/04/25 11:55:18 Provide link to the spec
+ // list is empty; it is populated when the user agent chooses to create its
+ // WorkletGlobalScope."
+ WTF::HashSet<std::unique_ptr<WorkletGlobalScopeProxy>> global_scope_proxies_;
+
private:
- HeapHashMap<int32_t /* request_id */, Member<ScriptPromiseResolver>>
- resolver_map_;
+ struct PendingTasks;
+ // TODO(nhiroki): We could replace |request_id| with |url|.
+ HeapHashMap<int32_t /* request_id */, Member<PendingTasks>>
+ pending_tasks_map_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698