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