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 Modulator_h | 5 #ifndef Modulator_h |
6 #define Modulator_h | 6 #define Modulator_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/dom/AncestorList.h" | 9 #include "core/dom/AncestorList.h" |
10 #include "platform/bindings/ScriptWrappable.h" | 10 #include "platform/bindings/ScriptWrappable.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // https://html.spec.whatwg.org/#fetch-a-single-module-script | 85 // https://html.spec.whatwg.org/#fetch-a-single-module-script |
86 virtual void FetchSingle(const ModuleScriptFetchRequest&, | 86 virtual void FetchSingle(const ModuleScriptFetchRequest&, |
87 ModuleGraphLevel, | 87 ModuleGraphLevel, |
88 SingleModuleClient*) = 0; | 88 SingleModuleClient*) = 0; |
89 | 89 |
90 virtual void FetchDescendantsForInlineScript(ModuleScript*, | 90 virtual void FetchDescendantsForInlineScript(ModuleScript*, |
91 ModuleTreeClient*) = 0; | 91 ModuleTreeClient*) = 0; |
92 | 92 |
93 // Synchronously retrieves a single module script from existing module map | 93 // Synchronously retrieves a single module script from existing module map |
94 // entry. | 94 // entry. |
95 // Note: returns nullptr if the module map entry is still "fetching". | 95 // Note: returns nullptr if the module map entry doesn't exist, or |
| 96 // is still "fetching". |
96 virtual ModuleScript* GetFetchedModuleScript(const KURL&) = 0; | 97 virtual ModuleScript* GetFetchedModuleScript(const KURL&) = 0; |
97 | 98 |
98 // https://html.spec.whatwg.org/#resolve-a-module-specifier | 99 // https://html.spec.whatwg.org/#resolve-a-module-specifier |
99 static KURL ResolveModuleSpecifier(const String& module_request, | 100 static KURL ResolveModuleSpecifier(const String& module_request, |
100 const KURL& base_url); | 101 const KURL& base_url); |
101 | 102 |
102 virtual ScriptModule CompileModule(const String& script, | 103 virtual ScriptModule CompileModule(const String& script, |
103 const String& url_str, | 104 const String& url_str, |
104 AccessControlStatus) = 0; | 105 AccessControlStatus) = 0; |
105 | 106 |
(...skipping 13 matching lines...) Expand all Loading... |
119 // if the cached entry doesn't exist. | 120 // if the cached entry doesn't exist. |
120 // The client can be notified either synchronously or asynchronously. | 121 // The client can be notified either synchronously or asynchronously. |
121 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&, | 122 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&, |
122 ModuleGraphLevel, | 123 ModuleGraphLevel, |
123 ModuleScriptLoaderClient*) = 0; | 124 ModuleScriptLoaderClient*) = 0; |
124 }; | 125 }; |
125 | 126 |
126 } // namespace blink | 127 } // namespace blink |
127 | 128 |
128 #endif | 129 #endif |
OLD | NEW |