| 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 6f923196ec8333e0e90fe4fddcd3d2ff2b5dd196..6086a2425b2d9c368a3d07f81b89d9520d659c8d 100644
|
| --- a/third_party/WebKit/Source/core/dom/Modulator.h
|
| +++ b/third_party/WebKit/Source/core/dom/Modulator.h
|
| @@ -8,10 +8,18 @@
|
| #include "core/CoreExport.h"
|
| #include "platform/heap/Handle.h"
|
| #include "platform/weborigin/KURL.h"
|
| +#include "platform/weborigin/ReferrerPolicy.h"
|
| +#include "wtf/text/WTFString.h"
|
|
|
| namespace blink {
|
|
|
| class LocalFrame;
|
| +class SecurityOrigin;
|
| +class ScriptModule;
|
| +
|
| +// spec: "top-level module fetch flag"
|
| +// https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts-is-top-level
|
| +enum class ModuleGraphLevel { TopLevelModuleFetch, DependentModuleFetch };
|
|
|
| // A Modulator is an interface for "environment settings object" concept for
|
| // module scripts.
|
| @@ -22,9 +30,16 @@ class CORE_EXPORT Modulator : public GarbageCollectedMixin {
|
| public:
|
| static Modulator* from(LocalFrame*);
|
|
|
| + virtual ReferrerPolicy referrerPolicy() = 0;
|
| + virtual SecurityOrigin* securityOrigin() = 0;
|
| +
|
| // https://html.spec.whatwg.org/#resolve-a-module-specifier
|
| static KURL resolveModuleSpecifier(const String& moduleRequest,
|
| const KURL& baseURL);
|
| +
|
| + // TODO(kouhei): script should be a ScriptSourceCode.
|
| + virtual ScriptModule compileModule(const String& script,
|
| + const String& urlStr) = 0;
|
| };
|
|
|
| } // namespace blink
|
|
|