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

Side by Side Diff: third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderRegistry.h

Issue 2697073002: [ES6 modules] Introduce ModuleScriptLoader (Closed)
Patch Set: rebased Created 3 years, 9 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 ModuleScriptLoaderRegistry_h
6 #define ModuleScriptLoaderRegistry_h
7
8 #include "core/CoreExport.h"
9 #include "platform/heap/Handle.h"
10 #include "platform/weborigin/KURL.h"
11 #include "wtf/HashSet.h"
12
13 namespace blink {
14
15 class Modulator;
16 class ModuleScriptFetchRequest;
17 class ModuleScriptLoader;
18 class ModuleScriptLoaderClient;
19 class ResourceFetcher;
20 enum class ModuleGraphLevel;
21
22 // ModuleScriptLoaderRegistry keeps active ModuleLoaders alive.
23 class CORE_EXPORT ModuleScriptLoaderRegistry final
24 : public GarbageCollected<ModuleScriptLoaderRegistry> {
25 public:
26 static ModuleScriptLoaderRegistry* create() {
27 return new ModuleScriptLoaderRegistry;
28 }
29 DECLARE_TRACE();
30
31 ModuleScriptLoader* fetch(const ModuleScriptFetchRequest&,
32 ModuleGraphLevel,
33 Modulator*,
34 ResourceFetcher*,
35 ModuleScriptLoaderClient*);
36
37 private:
38 ModuleScriptLoaderRegistry() = default;
39
40 friend class ModuleScriptLoader;
41 void releaseFinishedLoader(ModuleScriptLoader*);
42
43 HeapHashSet<Member<ModuleScriptLoader>> m_activeLoaders;
44 };
45
46 } // namespace blink
47
48 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698