Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Unified Diff: third_party/WebKit/Source/core/dom/Modulator.h

Issue 2697073002: [ES6 modules] Introduce ModuleScriptLoader (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698