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

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

Issue 2555653002: [WIP Prototype] ES6 https://html.spec.whatwg.org/#fetch-a-single-module-script implementation (Closed)
Patch Set: ModuleScriptLoaderTest 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 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 ModuleScriptLoader;
16 class ModuleController;
17 class ResourceFetcher;
18 class ModuleScriptLoaderClient;
19
20 // ModuleScriptLoaderRegistry keeps active ModuleLoaders alive.
21 class CORE_EXPORT ModuleScriptLoaderRegistry final
22 : public GarbageCollected<ModuleScriptLoaderRegistry> {
23 public:
24 static ModuleScriptLoaderRegistry* create() {
25 return new ModuleScriptLoaderRegistry;
26 }
27 DECLARE_TRACE();
28
29 ModuleScriptLoader* fetch(const KURL&,
30 const KURL& baseURL,
31 ModuleController*,
32 ResourceFetcher*,
33 ModuleScriptLoaderClient*);
34
35 private:
36 ModuleScriptLoaderRegistry() = default;
37
38 friend class ModuleScriptLoader;
39 void releaseFinishedLoader(ModuleScriptLoader*);
40
41 HeapHashSet<Member<ModuleScriptLoader>> m_activeLoaders;
42 };
43
44 } // namespace blink
45
46 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698