| 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 ebd8d1e421465e99d1ff092ccaae142ce54ad141..fca8f5e85c0834bedd4a2b34ce5c5f9847e77287 100644
|
| --- a/third_party/WebKit/Source/core/workers/Worklet.h
|
| +++ b/third_party/WebKit/Source/core/workers/Worklet.h
|
| @@ -6,20 +6,21 @@
|
| #define Worklet_h
|
|
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| +#include "bindings/core/v8/ScriptPromiseResolver.h"
|
| #include "bindings/core/v8/ScriptWrappable.h"
|
| #include "core/CoreExport.h"
|
| #include "core/dom/ContextLifecycleObserver.h"
|
| -#include "core/loader/resource/ScriptResource.h"
|
| +#include "core/workers/WorkletScriptLoader.h"
|
| #include "platform/heap/Handle.h"
|
| +#include "platform/loader/fetch/ResourceFetcher.h"
|
|
|
| namespace blink {
|
|
|
| class LocalFrame;
|
| -class ResourceFetcher;
|
| class WorkletGlobalScopeProxy;
|
| -class WorkletScriptLoader;
|
|
|
| class CORE_EXPORT Worklet : public GarbageCollectedFinalized<Worklet>,
|
| + public WorkletScriptLoader::Client,
|
| public ScriptWrappable,
|
| public ContextLifecycleObserver {
|
| DEFINE_WRAPPERTYPEINFO();
|
| @@ -27,7 +28,7 @@ class CORE_EXPORT Worklet : public GarbageCollectedFinalized<Worklet>,
|
| WTF_MAKE_NONCOPYABLE(Worklet);
|
|
|
| public:
|
| - virtual ~Worklet() {}
|
| + virtual ~Worklet() = default;
|
|
|
| virtual void initialize() {}
|
| virtual bool isInitialized() const { return true; }
|
| @@ -37,7 +38,9 @@ class CORE_EXPORT Worklet : public GarbageCollectedFinalized<Worklet>,
|
| // Worklet
|
| ScriptPromise import(ScriptState*, const String& url);
|
|
|
| - void notifyFinished(WorkletScriptLoader*);
|
| + // WorkletScriptLoader::Client
|
| + void notifyWorkletScriptLoadingFinished(WorkletScriptLoader*,
|
| + const ScriptSourceCode&) final;
|
|
|
| // ContextLifecycleObserver
|
| void contextDestroyed(ExecutionContext*) final;
|
| @@ -49,10 +52,9 @@ class CORE_EXPORT Worklet : public GarbageCollectedFinalized<Worklet>,
|
| explicit Worklet(LocalFrame*);
|
|
|
| private:
|
| - ResourceFetcher* fetcher() const { return m_fetcher.get(); }
|
| -
|
| - Member<ResourceFetcher> m_fetcher;
|
| - HeapHashSet<Member<WorkletScriptLoader>> m_scriptLoaders;
|
| + Member<LocalFrame> m_frame;
|
| + HeapHashMap<Member<WorkletScriptLoader>, Member<ScriptPromiseResolver>>
|
| + m_loaderAndResolvers;
|
| };
|
|
|
| } // namespace blink
|
|
|