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..8d1186dc8f59811aac80eee23fc5a46aeb2070c7 100644 |
--- a/third_party/WebKit/Source/core/dom/Modulator.h |
+++ b/third_party/WebKit/Source/core/dom/Modulator.h |
@@ -8,10 +8,16 @@ |
#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 ScriptModule; |
+ |
+// spec: "top-level module fetch flag" |
+enum class ModuleGraphLevel { TopLevelModuleFetch, DependentModuleFetch }; |
// A Modulator is an interface for "environment settings object" concept for |
// module scripts. |
@@ -22,9 +28,15 @@ class CORE_EXPORT Modulator : public GarbageCollectedMixin { |
public: |
static Modulator* from(LocalFrame*); |
+ virtual ReferrerPolicy referrerPolicy() = 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 |