| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ScriptModuleResolver_h | 5 #ifndef ScriptModuleResolver_h |
| 6 #define ScriptModuleResolver_h | 6 #define ScriptModuleResolver_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 #include "wtf/text/WTFString.h" | 11 #include "platform/wtf/text/WTFString.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class ScriptModule; | 15 class ScriptModule; |
| 16 class ModuleScript; | 16 class ModuleScript; |
| 17 | 17 |
| 18 // The ScriptModuleResolver interface is used from V8 module bindings | 18 // The ScriptModuleResolver interface is used from V8 module bindings |
| 19 // when it need the ScriptModule's descendants. | 19 // when it need the ScriptModule's descendants. |
| 20 // | 20 // |
| 21 // When a module writes import 'x', the module is called the referrer, 'x' is | 21 // When a module writes import 'x', the module is called the referrer, 'x' is |
| (...skipping 15 matching lines...) Expand all Loading... |
| 37 // https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule | 37 // https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule |
| 38 // This returns a null ScriptModule when an exception is thrown. | 38 // This returns a null ScriptModule when an exception is thrown. |
| 39 virtual ScriptModule Resolve(const String& specifier, | 39 virtual ScriptModule Resolve(const String& specifier, |
| 40 const ScriptModule& referrer, | 40 const ScriptModule& referrer, |
| 41 ExceptionState&) = 0; | 41 ExceptionState&) = 0; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace blink | 44 } // namespace blink |
| 45 | 45 |
| 46 #endif // ScriptModuleResolver_h | 46 #endif // ScriptModuleResolver_h |
| OLD | NEW |