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 |