| Index: third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.h
|
| diff --git a/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.h b/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.h
|
| index d10a232a324f01bea9d60241347c15402dc0e4c2..f9a224d64044d84f0eadc73ee4616a770c0ed2ba 100644
|
| --- a/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.h
|
| +++ b/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.h
|
| @@ -6,10 +6,10 @@
|
| #define ModuleScriptLoader_h
|
|
|
| #include "core/CoreExport.h"
|
| +#include "core/loader/modulescript/ModuleScriptCreationParams.h"
|
| #include "core/loader/modulescript/ModuleScriptFetchRequest.h"
|
| -#include "core/loader/resource/ScriptResource.h"
|
| +#include "core/loader/modulescript/ModuleScriptFetcher.h"
|
| #include "platform/heap/Handle.h"
|
| -#include "platform/loader/fetch/ResourceOwner.h"
|
| #include "platform/weborigin/KURL.h"
|
| #include "public/platform/WebURLRequest.h"
|
|
|
| @@ -19,6 +19,7 @@ class Modulator;
|
| class ModuleScript;
|
| class ModuleScriptLoaderClient;
|
| class ModuleScriptLoaderRegistry;
|
| +class ScriptResource;
|
| enum class ModuleGraphLevel;
|
|
|
| // A ModuleScriptLoader is responsible for loading a new single ModuleScript.
|
| @@ -30,10 +31,8 @@ enum class ModuleGraphLevel;
|
| //
|
| // ModuleScriptLoader(s) should only be used via Modulator and its ModuleMap.
|
| class CORE_EXPORT ModuleScriptLoader final
|
| - : public GarbageCollectedFinalized<ModuleScriptLoader>,
|
| - public ResourceOwner<ScriptResource> {
|
| + : public GarbageCollectedFinalized<ModuleScriptLoader> {
|
| WTF_MAKE_NONCOPYABLE(ModuleScriptLoader);
|
| - USING_GARBAGE_COLLECTED_MIXIN(ModuleScriptLoader);
|
|
|
| enum class State {
|
| kInitial,
|
| @@ -51,13 +50,14 @@ class CORE_EXPORT ModuleScriptLoader final
|
| return new ModuleScriptLoader(modulator, registry, client);
|
| }
|
|
|
| - ~ModuleScriptLoader() override;
|
| + ~ModuleScriptLoader();
|
|
|
| - // Note: fetch may notify |m_client| synchronously or asynchronously.
|
| void Fetch(const ModuleScriptFetchRequest&,
|
| ResourceFetcher*,
|
| ModuleGraphLevel);
|
|
|
| + void NotifyFetchFinished(WTF::Optional<ModuleScriptCreationParams>);
|
| +
|
| bool IsInitialState() const { return state_ == State::kInitial; }
|
| bool HasFinished() const { return state_ == State::kFinished; }
|
|
|
| @@ -73,10 +73,6 @@ class CORE_EXPORT ModuleScriptLoader final
|
| static const char* StateToString(State);
|
| #endif
|
|
|
| - // Implements ScriptResourceClient
|
| - void NotifyFinished(Resource*) override;
|
| - String DebugName() const override { return "ModuleScriptLoader"; }
|
| -
|
| Member<Modulator> modulator_;
|
| State state_ = State::kInitial;
|
| String nonce_;
|
| @@ -84,6 +80,7 @@ class CORE_EXPORT ModuleScriptLoader final
|
| Member<ModuleScript> module_script_;
|
| Member<ModuleScriptLoaderRegistry> registry_;
|
| Member<ModuleScriptLoaderClient> client_;
|
| + Member<ModuleScriptFetcher> module_fetcher_;
|
| #if DCHECK_IS_ON()
|
| KURL url_;
|
| #endif
|
|
|