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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptModuleResolver.h

Issue 2555653002: [WIP Prototype] ES6 https://html.spec.whatwg.org/#fetch-a-single-module-script implementation (Closed)
Patch Set: ModuleScriptLoaderTest Created 3 years, 11 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/bindings/core/v8/ScriptModuleResolver.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptModuleResolver.h b/third_party/WebKit/Source/bindings/core/v8/ScriptModuleResolver.h
new file mode 100644
index 0000000000000000000000000000000000000000..a563303fe7190c00b954ad7d7b225717041a654b
--- /dev/null
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptModuleResolver.h
@@ -0,0 +1,33 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ScriptModuleResolver_h
+#define ScriptModuleResolver_h
+
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class ScriptModule;
+class ScriptModuleIdentifier;
+class ModuleScript;
+
+// The ScriptModuleResolver interface is used from V8 module bindings
+// to resolve script module descendents references stored in core/dom module
+// implementation.
+class ScriptModuleResolver {
+ public:
+ // Called from ModuleMap to observe all fetched ModuleScript instances which
+ // might be specified as a referrer.
+ virtual void registerModuleScript(ModuleScript*) = 0;
+
+ // Implements "Runtime Semantics: HostResolveImportedModule"
+ // https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule
+ virtual ScriptModule resolve(const String& specifier,
+ ScriptModuleIdentifier referrer) = 0;
+};
+
+} // namespace blink
+
+#endif // ScriptModuleResolver_h

Powered by Google App Engine
This is Rietveld 408576698