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

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

Issue 2795593006: Abstract out Modulator from V8PerContextData (Closed)
Patch Set: Add new from method for Modulator 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 22517c73622907a69f17327d9a7ead0d4a4545aa..bae8f36969073c26fc3cdc22ab11856970195c73 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/weborigin/KURL.h"
@@ -39,11 +40,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;

Powered by Google App Engine
This is Rietveld 408576698