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

Unified Diff: Source/web/ServiceWorkerGlobalScopeProxy.h

Issue 383063008: Expose the ServiceWorker's v8 context to embedders. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Don't #include .cpp files. :-P Created 6 years, 5 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: Source/web/ServiceWorkerGlobalScopeProxy.h
diff --git a/Source/web/ServiceWorkerGlobalScopeProxy.h b/Source/web/ServiceWorkerGlobalScopeProxy.h
index a260dab301a97236c9d235b08fa937272565351d..cf145a9c3079987969ab92eb74a6d921f0469da2 100644
--- a/Source/web/ServiceWorkerGlobalScopeProxy.h
+++ b/Source/web/ServiceWorkerGlobalScopeProxy.h
@@ -39,6 +39,7 @@
namespace WebCore {
class ExecutionContext;
+class ScriptSourceCode;
}
namespace blink {
@@ -67,6 +68,9 @@ public:
static PassOwnPtr<ServiceWorkerGlobalScopeProxy> create(WebEmbeddedWorkerImpl&, WebCore::ExecutionContext&, WebServiceWorkerContextClient&);
virtual ~ServiceWorkerGlobalScopeProxy();
+ // Evaluates code in the worker's javascript context. (Can be passed a plain String.)
+ void evaluate(const WebCore::ScriptSourceCode&);
+
// WebServiceWorkerContextProxy overrides:
virtual void dispatchActivateEvent(int) OVERRIDE;
virtual void dispatchInstallEvent(int) OVERRIDE;
@@ -74,6 +78,7 @@ public:
virtual void dispatchMessageEvent(const WebString& message, const WebMessagePortChannelArray&) OVERRIDE;
virtual void dispatchPushEvent(int, const WebString& data) OVERRIDE;
virtual void dispatchSyncEvent(int) OVERRIDE;
+ virtual v8::Handle<v8::Context> v8Context() OVERRIDE;
// WorkerReportingProxy overrides:
virtual void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL) OVERRIDE;
« no previous file with comments | « no previous file | Source/web/ServiceWorkerGlobalScopeProxy.cpp » ('j') | Source/web/tests/ServiceWorkerGlobalScopeProxyTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698