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

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

Issue 2842923002: Support Inline module script (Closed)
Patch Set: 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* module_script,
91 ModuleTreeClient* client) {
92 NOTREACHED();
kouhei (in TOK) 2017/04/27 01:50:18 move this to DummyModulator
hiroshige 2017/04/27 21:57:20 Done.
93 }
94
90 // Synchronously retrieves a single module script from existing module map 95 // Synchronously retrieves a single module script from existing module map
91 // entry. 96 // entry.
92 // Note: returns nullptr if the module map entry is still "fetching". 97 // Note: returns nullptr if the module map entry is still "fetching".
93 virtual ModuleScript* GetFetchedModuleScript(const KURL&) = 0; 98 virtual ModuleScript* GetFetchedModuleScript(const KURL&) = 0;
94 99
95 // https://html.spec.whatwg.org/#resolve-a-module-specifier 100 // https://html.spec.whatwg.org/#resolve-a-module-specifier
96 static KURL ResolveModuleSpecifier(const String& module_request, 101 static KURL ResolveModuleSpecifier(const String& module_request,
97 const KURL& base_url); 102 const KURL& base_url);
98 103
99 virtual ScriptModule CompileModule(const String& script, 104 virtual ScriptModule CompileModule(const String& script,
(...skipping 14 matching lines...) Expand all
114 // if the cached entry doesn't exist. 119 // if the cached entry doesn't exist.
115 // The client can be notified either synchronously or asynchronously. 120 // The client can be notified either synchronously or asynchronously.
116 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&, 121 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&,
117 ModuleGraphLevel, 122 ModuleGraphLevel,
118 ModuleScriptLoaderClient*) = 0; 123 ModuleScriptLoaderClient*) = 0;
119 }; 124 };
120 125
121 } // namespace blink 126 } // namespace blink
122 127
123 #endif 128 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698