Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: third_party/WebKit/Source/core/dom/Modulator.h

Issue 2815453006: Introduce ModulePendingScript (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 Modulator_h 5 #ifndef Modulator_h
6 #define Modulator_h 6 #define Modulator_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "bindings/core/v8/V8PerContextData.h" 9 #include "bindings/core/v8/V8PerContextData.h"
10 #include "core/CoreExport.h" 10 #include "core/CoreExport.h"
(...skipping 16 matching lines...) Expand all
27 class WebTaskRunner; 27 class WebTaskRunner;
28 28
29 // A SingleModuleClient is notified when single module script node (node as in a 29 // A SingleModuleClient is notified when single module script node (node as in a
30 // module tree graph) load is complete and its corresponding entry is created in 30 // module tree graph) load is complete and its corresponding entry is created in
31 // module map. 31 // module map.
32 class SingleModuleClient : public GarbageCollectedMixin { 32 class SingleModuleClient : public GarbageCollectedMixin {
33 public: 33 public:
34 virtual void NotifyModuleLoadFinished(ModuleScript*) = 0; 34 virtual void NotifyModuleLoadFinished(ModuleScript*) = 0;
35 }; 35 };
36 36
37 // A ModuleTreeClient is notified when a module script and its whole descendent
38 // tree load is complete.
39 class ModuleTreeClient : public GarbageCollectedMixin {
40 public:
41 virtual void NotifyModuleTreeLoadFinished(ModuleScript*) = 0;
42 };
43
37 // spec: "top-level module fetch flag" 44 // spec: "top-level module fetch flag"
38 // https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts-is-to p-level 45 // https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts-is-to p-level
39 enum class ModuleGraphLevel { kTopLevelModuleFetch, kDependentModuleFetch }; 46 enum class ModuleGraphLevel { kTopLevelModuleFetch, kDependentModuleFetch };
40 47
41 // A Modulator is an interface for "environment settings object" concept for 48 // A Modulator is an interface for "environment settings object" concept for
42 // module scripts. 49 // module scripts.
43 // https://html.spec.whatwg.org/#environment-settings-object 50 // https://html.spec.whatwg.org/#environment-settings-object
44 // 51 //
45 // A Modulator also serves as an entry point for various module spec algorithms. 52 // A Modulator also serves as an entry point for various module spec algorithms.
46 class CORE_EXPORT Modulator : public GarbageCollectedFinalized<Modulator>, 53 class CORE_EXPORT Modulator : public GarbageCollectedFinalized<Modulator>,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // if the cached entry doesn't exist. 95 // if the cached entry doesn't exist.
89 // The client can be notified either synchronously or asynchronously. 96 // The client can be notified either synchronously or asynchronously.
90 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&, 97 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&,
91 ModuleGraphLevel, 98 ModuleGraphLevel,
92 ModuleScriptLoaderClient*) = 0; 99 ModuleScriptLoaderClient*) = 0;
93 }; 100 };
94 101
95 } // namespace blink 102 } // namespace blink
96 103
97 #endif 104 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698