OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ScriptModuleResolver_h |
| 6 #define ScriptModuleResolver_h |
| 7 |
| 8 #include "wtf/text/WTFString.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class ScriptModule; |
| 13 class ScriptModuleIdentifier; |
| 14 class ModuleScript; |
| 15 |
| 16 // The ScriptModuleResolver interface is used from V8 module bindings |
| 17 // to resolve script module descendents references stored in core/dom module |
| 18 // implementation. |
| 19 class ScriptModuleResolver { |
| 20 public: |
| 21 // Called from ModuleMap to observe all fetched ModuleScript instances which |
| 22 // might be specified as a referrer. |
| 23 virtual void registerModuleScript(ModuleScript*) = 0; |
| 24 |
| 25 // Implements "Runtime Semantics: HostResolveImportedModule" |
| 26 // https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule |
| 27 virtual ScriptModule resolve(const String& specifier, |
| 28 ScriptModuleIdentifier referrer) = 0; |
| 29 }; |
| 30 |
| 31 } // namespace blink |
| 32 |
| 33 #endif // ScriptModuleResolver_h |
OLD | NEW |