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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 const KURL& base_url); | 71 const KURL& base_url); |
72 | 72 |
73 virtual ScriptModule CompileModule(const String& script, | 73 virtual ScriptModule CompileModule(const String& script, |
74 const String& url_str, | 74 const String& url_str, |
75 AccessControlStatus) = 0; | 75 AccessControlStatus) = 0; |
76 | 76 |
77 virtual ScriptValue InstantiateModule(ScriptModule) = 0; | 77 virtual ScriptValue InstantiateModule(ScriptModule) = 0; |
78 | 78 |
79 virtual Vector<String> ModuleRequestsFromScriptModule(ScriptModule) = 0; | 79 virtual Vector<String> ModuleRequestsFromScriptModule(ScriptModule) = 0; |
80 | 80 |
81 virtual void ExecuteModule(ScriptModule) = 0; | |
82 | |
83 private: | 81 private: |
84 friend class ModuleMap; | 82 friend class ModuleMap; |
85 | 83 |
86 // Fetches a single module script. | 84 // Fetches a single module script. |
87 // This is triggered from fetchSingle() implementation (which is in ModuleMap) | 85 // This is triggered from fetchSingle() implementation (which is in ModuleMap) |
88 // if the cached entry doesn't exist. | 86 // if the cached entry doesn't exist. |
89 // The client can be notified either synchronously or asynchronously. | 87 // The client can be notified either synchronously or asynchronously. |
90 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&, | 88 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&, |
91 ModuleGraphLevel, | 89 ModuleGraphLevel, |
92 ModuleScriptLoaderClient*) = 0; | 90 ModuleScriptLoaderClient*) = 0; |
93 }; | 91 }; |
94 | 92 |
95 } // namespace blink | 93 } // namespace blink |
96 | 94 |
97 #endif | 95 #endif |
OLD | NEW |