Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(577)

Side by Side Diff: third_party/WebKit/Source/core/dom/Modulator.h

Issue 2842923002: Support Inline module script (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 ModuleGraphLevel, 80 ModuleGraphLevel,
81 ModuleTreeClient*) = 0; 81 ModuleTreeClient*) = 0;
82 82
83 // Asynchronously retrieve a module script from the module map, or fetch it 83 // Asynchronously retrieve a module script from the module map, or fetch it
84 // and put it in the map if it's not there already. 84 // and put it in the map if it's not there already.
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*,
91 ModuleTreeClient*) = 0;
92
90 // Synchronously retrieves a single module script from existing module map 93 // Synchronously retrieves a single module script from existing module map
91 // entry. 94 // entry.
92 // Note: returns nullptr if the module map entry is still "fetching". 95 // Note: returns nullptr if the module map entry is still "fetching".
93 virtual ModuleScript* GetFetchedModuleScript(const KURL&) = 0; 96 virtual ModuleScript* GetFetchedModuleScript(const KURL&) = 0;
94 97
95 // https://html.spec.whatwg.org/#resolve-a-module-specifier 98 // https://html.spec.whatwg.org/#resolve-a-module-specifier
96 static KURL ResolveModuleSpecifier(const String& module_request, 99 static KURL ResolveModuleSpecifier(const String& module_request,
97 const KURL& base_url); 100 const KURL& base_url);
98 101
99 virtual ScriptModule CompileModule(const String& script, 102 virtual ScriptModule CompileModule(const String& script,
(...skipping 16 matching lines...) Expand all
116 // if the cached entry doesn't exist. 119 // if the cached entry doesn't exist.
117 // The client can be notified either synchronously or asynchronously. 120 // The client can be notified either synchronously or asynchronously.
118 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&, 121 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&,
119 ModuleGraphLevel, 122 ModuleGraphLevel,
120 ModuleScriptLoaderClient*) = 0; 123 ModuleScriptLoaderClient*) = 0;
121 }; 124 };
122 125
123 } // namespace blink 126 } // namespace blink
124 127
125 #endif 128 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/dom/ModulatorImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698