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 ModuleTreeLinker_h | 5 #ifndef ModuleTreeLinker_h |
6 #define ModuleTreeLinker_h | 6 #define ModuleTreeLinker_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 "core/dom/Modulator.h" | 10 #include "core/dom/Modulator.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 public SingleModuleClient { | 24 public SingleModuleClient { |
25 USING_GARBAGE_COLLECTED_MIXIN(ModuleTreeLinker); | 25 USING_GARBAGE_COLLECTED_MIXIN(ModuleTreeLinker); |
26 | 26 |
27 public: | 27 public: |
28 static ModuleTreeLinker* Fetch(const ModuleScriptFetchRequest&, | 28 static ModuleTreeLinker* Fetch(const ModuleScriptFetchRequest&, |
29 const AncestorList&, | 29 const AncestorList&, |
30 ModuleGraphLevel, | 30 ModuleGraphLevel, |
31 Modulator*, | 31 Modulator*, |
32 ModuleTreeLinkerRegistry*, | 32 ModuleTreeLinkerRegistry*, |
33 ModuleTreeClient*); | 33 ModuleTreeClient*); |
| 34 static ModuleTreeLinker* FetchDescendantsForInlineScript( |
| 35 ModuleScript*, |
| 36 Modulator*, |
| 37 ModuleTreeLinkerRegistry*, |
| 38 ModuleTreeClient*); |
| 39 |
34 virtual ~ModuleTreeLinker() = default; | 40 virtual ~ModuleTreeLinker() = default; |
35 DECLARE_TRACE(); | 41 DECLARE_TRACE(); |
36 | 42 |
37 bool IsFetching() const { | 43 bool IsFetching() const { |
38 return State::kFetchingSelf <= state_ && state_ < State::kFinished; | 44 return State::kFetchingSelf <= state_ && state_ < State::kFinished; |
39 } | 45 } |
40 bool HasFinished() const { return state_ == State::kFinished; } | 46 bool HasFinished() const { return state_ == State::kFinished; } |
41 | 47 |
42 private: | 48 private: |
43 ModuleTreeLinker(const AncestorList& ancestor_list_with_url, | 49 ModuleTreeLinker(const AncestorList& ancestor_list_with_url, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // Correspond to _descendants result_ in | 91 // Correspond to _descendants result_ in |
86 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri
pt-graph-fetching-procedure | 92 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri
pt-graph-fetching-procedure |
87 Member<ModuleScript> descendants_module_script_; | 93 Member<ModuleScript> descendants_module_script_; |
88 size_t num_incomplete_descendants_ = 0; | 94 size_t num_incomplete_descendants_ = 0; |
89 HeapHashSet<Member<DependencyModuleClient>> dependency_clients_; | 95 HeapHashSet<Member<DependencyModuleClient>> dependency_clients_; |
90 }; | 96 }; |
91 | 97 |
92 } // namespace blink | 98 } // namespace blink |
93 | 99 |
94 #endif | 100 #endif |
OLD | NEW |