| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ModuleTreeLinkerRegistry_h | 5 #ifndef ModuleTreeLinkerRegistry_h |
| 6 #define ModuleTreeLinkerRegistry_h | 6 #define ModuleTreeLinkerRegistry_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/dom/AncestorList.h" | 9 #include "core/dom/AncestorList.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class Modulator; | 14 class Modulator; |
| 15 class ModuleScriptFetchRequest; | 15 class ModuleScriptFetchRequest; |
| 16 class ModuleTreeClient; | 16 class ModuleTreeClient; |
| 17 class ModuleTreeLinker; | 17 class ModuleTreeLinker; |
| 18 enum class ModuleGraphLevel; | 18 enum class ModuleGraphLevel; |
| 19 class ModuleScript; |
| 19 | 20 |
| 20 // ModuleTreeLinkerRegistry keeps active ModuleTreeLinkers alive. | 21 // ModuleTreeLinkerRegistry keeps active ModuleTreeLinkers alive. |
| 21 class CORE_EXPORT ModuleTreeLinkerRegistry | 22 class CORE_EXPORT ModuleTreeLinkerRegistry |
| 22 : public GarbageCollected<ModuleTreeLinkerRegistry> { | 23 : public GarbageCollected<ModuleTreeLinkerRegistry> { |
| 23 public: | 24 public: |
| 24 static ModuleTreeLinkerRegistry* Create() { | 25 static ModuleTreeLinkerRegistry* Create() { |
| 25 return new ModuleTreeLinkerRegistry; | 26 return new ModuleTreeLinkerRegistry; |
| 26 } | 27 } |
| 27 DECLARE_TRACE(); | 28 DECLARE_TRACE(); |
| 28 | 29 |
| 29 ModuleTreeLinker* Fetch(const ModuleScriptFetchRequest&, | 30 ModuleTreeLinker* Fetch(const ModuleScriptFetchRequest&, |
| 30 const AncestorList&, | 31 const AncestorList&, |
| 31 ModuleGraphLevel, | 32 ModuleGraphLevel, |
| 32 Modulator*, | 33 Modulator*, |
| 33 ModuleTreeClient*); | 34 ModuleTreeClient*); |
| 35 ModuleTreeLinker* FetchDescendantsForInlineScript(ModuleScript*, |
| 36 Modulator*, |
| 37 ModuleTreeClient*); |
| 34 | 38 |
| 35 private: | 39 private: |
| 36 ModuleTreeLinkerRegistry() = default; | 40 ModuleTreeLinkerRegistry() = default; |
| 37 | 41 |
| 38 friend class ModuleTreeLinker; | 42 friend class ModuleTreeLinker; |
| 39 void ReleaseFinishedFetcher(ModuleTreeLinker*); | 43 void ReleaseFinishedFetcher(ModuleTreeLinker*); |
| 40 | 44 |
| 41 HeapHashSet<Member<ModuleTreeLinker>> active_tree_linkers_; | 45 HeapHashSet<Member<ModuleTreeLinker>> active_tree_linkers_; |
| 42 }; | 46 }; |
| 43 | 47 |
| 44 } // namespace blink | 48 } // namespace blink |
| 45 | 49 |
| 46 #endif | 50 #endif |
| OLD | NEW |