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

Unified Diff: third_party/WebKit/Source/core/dom/Modulator.h

Issue 2795593006: Abstract out Modulator from V8PerContextData (Closed)
Patch Set: Fix tests 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Modulator.h
diff --git a/third_party/WebKit/Source/core/dom/Modulator.h b/third_party/WebKit/Source/core/dom/Modulator.h
index 4d6c90cc395a04a71c653d9c77ef21d052994cc7..953c7840f7f29f78f39615b896c5aae1483f1833 100644
--- a/third_party/WebKit/Source/core/dom/Modulator.h
+++ b/third_party/WebKit/Source/core/dom/Modulator.h
@@ -5,6 +5,7 @@
#ifndef Modulator_h
#define Modulator_h
+#include "bindings/core/v8/V8PerContextData.h"
#include "core/CoreExport.h"
#include "platform/heap/Handle.h"
#include "platform/loader/fetch/AccessControlStatus.h"
@@ -40,11 +41,18 @@ enum class ModuleGraphLevel { TopLevelModuleFetch, DependentModuleFetch };
// https://html.spec.whatwg.org/#environment-settings-object
//
// A Modulator also serves as an entry point for various module spec algorithms.
-class CORE_EXPORT Modulator : public GarbageCollectedFinalized<Modulator> {
+class CORE_EXPORT Modulator : public GarbageCollectedFinalized<Modulator>,
+ public V8PerContextData::Data {
+ USING_GARBAGE_COLLECTED_MIXIN(Modulator);
+
public:
static Modulator* from(LocalFrame*);
+ static Modulator* from(V8PerContextData*);
virtual ~Modulator();
+ static void setModulator(LocalFrame*, Modulator*);
+ static void clearModulator(LocalFrame*);
+
DEFINE_INLINE_VIRTUAL_TRACE() {}
virtual ScriptModuleResolver* scriptModuleResolver() = 0;
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp ('k') | third_party/WebKit/Source/core/dom/Modulator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698