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 "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "bindings/core/v8/V8PerContextData.h" | 9 #include "bindings/core/v8/V8PerContextData.h" |
10 #include "core/CoreExport.h" | 10 #include "core/CoreExport.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 const KURL& base_url); | 97 const KURL& base_url); |
98 | 98 |
99 virtual ScriptModule CompileModule(const String& script, | 99 virtual ScriptModule CompileModule(const String& script, |
100 const String& url_str, | 100 const String& url_str, |
101 AccessControlStatus) = 0; | 101 AccessControlStatus) = 0; |
102 | 102 |
103 virtual ScriptValue InstantiateModule(ScriptModule) = 0; | 103 virtual ScriptValue InstantiateModule(ScriptModule) = 0; |
104 | 104 |
105 virtual Vector<String> ModuleRequestsFromScriptModule(ScriptModule) = 0; | 105 virtual Vector<String> ModuleRequestsFromScriptModule(ScriptModule) = 0; |
106 | 106 |
| 107 virtual void ExecuteModule(const ModuleScript*) = 0; |
| 108 |
107 private: | 109 private: |
108 friend class ModuleMap; | 110 friend class ModuleMap; |
109 | 111 |
110 // Fetches a single module script. | 112 // Fetches a single module script. |
111 // This is triggered from fetchSingle() implementation (which is in ModuleMap) | 113 // This is triggered from fetchSingle() implementation (which is in ModuleMap) |
112 // if the cached entry doesn't exist. | 114 // if the cached entry doesn't exist. |
113 // The client can be notified either synchronously or asynchronously. | 115 // The client can be notified either synchronously or asynchronously. |
114 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&, | 116 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&, |
115 ModuleGraphLevel, | 117 ModuleGraphLevel, |
116 ModuleScriptLoaderClient*) = 0; | 118 ModuleScriptLoaderClient*) = 0; |
117 }; | 119 }; |
118 | 120 |
119 } // namespace blink | 121 } // namespace blink |
120 | 122 |
121 #endif | 123 #endif |
OLD | NEW |