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 ModuleTreeLinkerRegistry_h |
| 6 #define ModuleTreeLinkerRegistry_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "core/dom/AncestorList.h" |
| 10 #include "platform/heap/Handle.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class Modulator; |
| 15 class ModuleScriptFetchRequest; |
| 16 class ModuleTreeClient; |
| 17 class ModuleTreeLinker; |
| 18 enum class ModuleGraphLevel; |
| 19 |
| 20 // ModuleTreeLinkerRegistry keeps active ModuleTreeLinkers alive. |
| 21 class CORE_EXPORT ModuleTreeLinkerRegistry |
| 22 : public GarbageCollected<ModuleTreeLinkerRegistry> { |
| 23 public: |
| 24 static ModuleTreeLinkerRegistry* Create() { |
| 25 return new ModuleTreeLinkerRegistry; |
| 26 } |
| 27 DECLARE_TRACE(); |
| 28 |
| 29 ModuleTreeLinker* Fetch(const ModuleScriptFetchRequest&, |
| 30 const AncestorList&, |
| 31 ModuleGraphLevel, |
| 32 Modulator*, |
| 33 ModuleTreeClient*); |
| 34 |
| 35 private: |
| 36 ModuleTreeLinkerRegistry() = default; |
| 37 |
| 38 friend class ModuleTreeLinker; |
| 39 void ReleaseFinishedFetcher(ModuleTreeLinker*); |
| 40 |
| 41 HeapHashSet<Member<ModuleTreeLinker>> active_tree_linkers_; |
| 42 }; |
| 43 |
| 44 } // namespace blink |
| 45 |
| 46 #endif |
OLD | NEW |