Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Modulator.h |
| diff --git a/third_party/WebKit/Source/core/dom/Modulator.h b/third_party/WebKit/Source/core/dom/Modulator.h |
| index ef95e0b48bf21f23ff408d924aa9dd71da8f2474..5afa76bde9a71278f91e87645b2c8632e42566e7 100644 |
| --- a/third_party/WebKit/Source/core/dom/Modulator.h |
| +++ b/third_party/WebKit/Source/core/dom/Modulator.h |
| @@ -8,6 +8,7 @@ |
| #include "bindings/core/v8/ScriptWrappable.h" |
| #include "bindings/core/v8/V8PerContextData.h" |
| #include "core/CoreExport.h" |
| +#include "core/dom/AncestorList.h" |
| #include "platform/heap/Handle.h" |
| #include "platform/loader/fetch/AccessControlStatus.h" |
| #include "platform/weborigin/KURL.h" |
| @@ -29,11 +30,18 @@ class WebTaskRunner; |
| // A SingleModuleClient is notified when single module script node (node as in a |
| // module tree graph) load is complete and its corresponding entry is created in |
| // module map. |
| -class SingleModuleClient : public GarbageCollectedMixin { |
| +class CORE_EXPORT SingleModuleClient : public GarbageCollectedMixin { |
| public: |
| virtual void NotifyModuleLoadFinished(ModuleScript*) = 0; |
| }; |
| +// A ModuleTreeClient is notified when a module script and its whole descendent |
| +// tree load is complete. |
| +class CORE_EXPORT ModuleTreeClient : public GarbageCollectedMixin { |
| + public: |
| + virtual void NotifyModuleTreeLoadFinished(ModuleScript*) = 0; |
| +}; |
| + |
| // spec: "top-level module fetch flag" |
| // https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts-is-top-level |
| enum class ModuleGraphLevel { kTopLevelModuleFetch, kDependentModuleFetch }; |
| @@ -62,6 +70,23 @@ class CORE_EXPORT Modulator : public GarbageCollectedFinalized<Modulator>, |
| virtual ReferrerPolicy GetReferrerPolicy() = 0; |
| virtual SecurityOrigin* GetSecurityOrigin() = 0; |
| + // https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-script-tree |
| + virtual void FetchTree(const ModuleScriptFetchRequest&, |
| + ModuleTreeClient*) = 0; |
| + |
| + // https://html.spec.whatwg.org/#internal-module-script-graph-fetching-procedure |
| + virtual void FetchTreeInternal(const ModuleScriptFetchRequest&, |
| + const AncestorList&, |
| + ModuleGraphLevel, |
| + ModuleTreeClient*) = 0; |
|
kinuko
2017/04/18 00:48:42
This seems to be a substep of above (and the metho
kinuko
2017/04/18 00:48:42
Ok, I found the callsite in the other CL for #fetc
kouhei (in TOK)
2017/04/18 00:53:18
I think this is a good question.
The only "public"
|
| + |
| + // Asynchronously retrieve a module script from the module map, or fetch it |
| + // and put it in the map if it's not there already. |
| + // https://html.spec.whatwg.org/#fetch-a-single-module-script |
| + virtual void FetchSingle(const ModuleScriptFetchRequest&, |
| + ModuleGraphLevel, |
| + SingleModuleClient*) = 0; |
| + |
| // Synchronously retrieves a single module script from existing module map |
| // entry. |
| virtual ModuleScript* GetFetchedModuleScript(const KURL&) = 0; |