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

Side by Side Diff: third_party/WebKit/Source/core/dom/ModuleMap.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 ModuleMap_h 5 #ifndef ModuleMap_h
6 #define ModuleMap_h 6 #define ModuleMap_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "bindings/core/v8/TraceWrapperMember.h" 9 #include "bindings/core/v8/TraceWrapperMember.h"
10 #include "core/CoreExport.h" 10 #include "core/CoreExport.h"
(...skipping 22 matching lines...) Expand all
33 return new ModuleMap(modulator); 33 return new ModuleMap(modulator);
34 } 34 }
35 DECLARE_TRACE(); 35 DECLARE_TRACE();
36 DECLARE_TRACE_WRAPPERS(); 36 DECLARE_TRACE_WRAPPERS();
37 37
38 // https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-modul e-script 38 // https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-modul e-script
39 void FetchSingleModuleScript(const ModuleScriptFetchRequest&, 39 void FetchSingleModuleScript(const ModuleScriptFetchRequest&,
40 ModuleGraphLevel, 40 ModuleGraphLevel,
41 SingleModuleClient*); 41 SingleModuleClient*);
42 42
43 void SetInlineModuleScript(ModuleScript*);
44
43 // Synchronously get the ModuleScript for a given URL. 45 // Synchronously get the ModuleScript for a given URL.
44 // Note: fetchSingleModuleScript of the ModuleScript must be complete before 46 // Note: fetchSingleModuleScript of the ModuleScript must be complete before
45 // calling this. 47 // calling this.
46 ModuleScript* GetFetchedModuleScript(const KURL&) const; 48 ModuleScript* GetFetchedModuleScript(const KURL&) const;
47 49
48 Modulator* GetModulator() { return modulator_; } 50 Modulator* GetModulator() { return modulator_; }
49 51
50 private: 52 private:
51 explicit ModuleMap(Modulator*); 53 explicit ModuleMap(Modulator*);
52 54
53 using MapImpl = HeapHashMap<KURL, TraceWrapperMember<Entry>>; 55 using MapImpl = HeapHashMap<KURL, TraceWrapperMember<Entry>>;
54 56
55 // A module map is a map of absolute URLs to map entry. 57 // A module map is a map of absolute URLs to map entry.
56 MapImpl map_; 58 MapImpl map_;
57 59
58 Member<Modulator> modulator_; 60 Member<Modulator> modulator_;
59 }; 61 };
60 62
61 } // namespace blink 63 } // namespace blink
62 64
63 #endif 65 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698