OLD | NEW |
---|---|
(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 "core/CoreExport.h" | |
10 #include "core/dom/ScriptModuleResolver.h" | |
11 #include "platform/heap/Handle.h" | |
12 #include "wtf/HashMap.h" | |
13 #include "wtf/text/WTFString.h" | |
14 | |
15 namespace blink { | |
16 | |
17 class Modulator; | |
18 class ModuleScript; | |
19 class ScriptModule; | |
20 | |
21 class CORE_EXPORT ScriptModuleResolverImpl final : public ScriptModuleResolver { | |
haraken
2017/04/05 11:48:29
Add a class-level comment.
kouhei (in TOK)
2017/04/06 05:34:18
Done.
| |
22 public: | |
23 static ScriptModuleResolverImpl* create(Modulator* modulator) { | |
24 return new ScriptModuleResolverImpl(modulator); | |
25 } | |
26 | |
27 DECLARE_VIRTUAL_TRACE(); | |
28 | |
29 // Implements ScriptModuleResolver: | |
30 | |
31 void registerModuleScript(ModuleScript*) override; | |
32 // Implements "Runtime Semantics: HostResolveImportedModule" per HTML spec. | |
33 // https://html.spec.whatwg.org/#hostresolveimportedmodule(referencingmodule,- specifier) | |
34 ScriptModule resolve(const String& specifier, | |
35 const ScriptModule& referrer, | |
36 ExceptionState&) override; | |
37 | |
38 private: | |
39 ScriptModuleResolverImpl(Modulator* modulator) : m_modulator(modulator) {} | |
haraken
2017/04/05 11:48:29
Add explicit.
kouhei (in TOK)
2017/04/06 05:34:18
Done.
| |
40 | |
41 HeapHashMap<ScriptModule, Member<ModuleScript>> m_recordToModuleScriptMap; | |
42 Member<Modulator> m_modulator; | |
43 }; | |
44 | |
45 } // namespace blink | |
46 | |
47 #endif // ScriptModuleResolverImpl_h | |
OLD | NEW |