| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 Modulator*, | 44 Modulator*, |
| 45 ModuleTreeLinkerRegistry*, | 45 ModuleTreeLinkerRegistry*, |
| 46 ModuleTreeClient*); | 46 ModuleTreeClient*); |
| 47 | 47 |
| 48 enum class State { | 48 enum class State { |
| 49 kInitial, | 49 kInitial, |
| 50 // Running fetch of the module script corresponding to the target node. | 50 // Running fetch of the module script corresponding to the target node. |
| 51 kFetchingSelf, | 51 kFetchingSelf, |
| 52 // Running fetch of descendants of the target node. | 52 // Running fetch of descendants of the target node. |
| 53 kFetchingDependencies, | 53 kFetchingDependencies, |
| 54 // Instantiating m_moduleScript and the node descendants. | 54 // Instantiating module_script_ and the node descendants. |
| 55 kInstantiating, | 55 kInstantiating, |
| 56 kFinished, | 56 kFinished, |
| 57 }; | 57 }; |
| 58 #if DCHECK_IS_ON() | 58 #if DCHECK_IS_ON() |
| 59 static const char* StateToString(State); | 59 static const char* StateToString(State); |
| 60 #endif | 60 #endif |
| 61 void AdvanceState(State); | 61 void AdvanceState(State); |
| 62 | 62 |
| 63 void FetchSelf(const ModuleScriptFetchRequest&, ModuleGraphLevel); | 63 void FetchSelf(const ModuleScriptFetchRequest&, ModuleGraphLevel); |
| 64 // Implements SingleModuleClient | 64 // Implements SingleModuleClient |
| (...skipping 20 matching lines...) Expand all Loading... |
| 85 // Correspond to _descendants result_ in | 85 // Correspond to _descendants result_ in |
| 86 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri
pt-graph-fetching-procedure | 86 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri
pt-graph-fetching-procedure |
| 87 Member<ModuleScript> descendants_module_script_; | 87 Member<ModuleScript> descendants_module_script_; |
| 88 size_t num_incomplete_descendants_ = 0; | 88 size_t num_incomplete_descendants_ = 0; |
| 89 HeapHashSet<Member<DependencyModuleClient>> dependency_clients_; | 89 HeapHashSet<Member<DependencyModuleClient>> dependency_clients_; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace blink | 92 } // namespace blink |
| 93 | 93 |
| 94 #endif | 94 #endif |
| OLD | NEW |