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

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

Issue 2555653002: [WIP Prototype] ES6 https://html.spec.whatwg.org/#fetch-a-single-module-script implementation (Closed)
Patch Set: address haraken/yhirano comments Created 3 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ScriptModuleResolverImpl_h
6 #define ScriptModuleResolverImpl_h
7
8 #include "bindings/core/v8/ScriptModule.h"
9 #include "bindings/core/v8/ScriptModuleResolver.h"
10 #include "platform/heap/Handle.h"
11 #include "wtf/HashMap.h"
12 #include "wtf/text/WTFString.h"
13
14 namespace blink {
15
16 class Modulator;
17 class ModuleScript;
18 class ScriptModule;
19
20 class ScriptModuleResolverImpl final : public ScriptModuleResolver {
21 public:
22 static ScriptModuleResolverImpl* create(Modulator* modulator) {
23 return new ScriptModuleResolverImpl(modulator);
24 }
25
26 DECLARE_VIRTUAL_TRACE();
27
28 // Implements ScriptModuleResolver:
29 void registerModuleScript(ModuleScript*) override;
30 ScriptModule resolve(const String& specifier,
31 ScriptModuleIdentifier referrer) override;
32
33 private:
34 ScriptModuleResolverImpl(Modulator* modulator) : m_modulator(modulator) {}
35
36 HeapHashMap<ScriptModuleIdentifier, Member<ModuleScript>>
37 m_recordToModuleScriptMap;
38 Member<Modulator> m_modulator;
39 };
40
41 } // namespace blink
42
43 #endif // ScriptModuleResolverImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698