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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ModuleProxy.h

Issue 1535943005: Initial implementation of bindings and basic classes for worklets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 12 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/bindings/core/v8/ModuleProxy.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ModuleProxy.h b/third_party/WebKit/Source/bindings/core/v8/ModuleProxy.h
index 781dfc3f4f1463d004058418d2d85da402ac3241..fbe6403919bf391f1bf03b011c1f634446481a7a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ModuleProxy.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ModuleProxy.h
@@ -5,20 +5,32 @@
#ifndef ModuleProxy_h
#define ModuleProxy_h
+#include "core/CoreExport.h"
#include "wtf/Allocator.h"
#include <v8.h>
namespace blink {
+class ExecutionContext;
+
// A proxy class to invoke functions implemented in bindings/modules
// from bindings/core.
-class ModuleProxy {
+class CORE_EXPORT ModuleProxy {
USING_FAST_MALLOC(ModuleProxy);
public:
static ModuleProxy& moduleProxy();
+ ExecutionContext* toExecutionContextForModules(v8::Local<v8::Context>);
+ void registerToExecutionContextForModules(ExecutionContext* (*toExecutionContextForModules)(v8::Local<v8::Context>));
+
+ v8::Local<v8::Context> toV8ContextForModules(ExecutionContext*);
haraken 2016/01/05 06:08:06 Can you move these methods to V8BindingForModules.
ikilpatrick 2016/01/07 22:47:35 Sorry, I'm not clear what you mean here. Actual fu
+ void registerToV8ContextForModules(v8::Local<v8::Context> (*toV8ContextForModules)(ExecutionContext*));
+
private:
ModuleProxy() { }
+
+ ExecutionContext* (*m_toExecutionContextForModules)(v8::Local<v8::Context>) = nullptr;
+ v8::Local<v8::Context> (*m_toV8ContextForModules)(ExecutionContext*) = nullptr;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698