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

Unified Diff: public/web/WebServiceWorkerContextClient.h

Issue 78233002: Implement initial part of WebEmbeddedWorker (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed comments Created 7 years, 1 month 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
« no previous file with comments | « public/web/WebEmbeddedWorkerStartData.h ('k') | public/web/WebServiceWorkerContextProxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebServiceWorkerContextClient.h
diff --git a/public/web/WebServiceWorkerContextClient.h b/public/web/WebServiceWorkerContextClient.h
index 4ee02d16431aa2dc26f6eaea9e63421a24cd38e7..22e104a711020e9691e57386935490f6f3f8e9aa 100644
--- a/public/web/WebServiceWorkerContextClient.h
+++ b/public/web/WebServiceWorkerContextClient.h
@@ -40,10 +40,12 @@ class WebServiceWorkerContextProxy;
// This interface is implemented by the client. It is suppoed to be created
// on the main thread and then passed on to the worker thread to be owned
-// by a newly created WorkerGlobalScope. All methods of this class are
-// called on the worker thread.
+// by a newly created WorkerGlobalScope. All methods of this class, except
+// for workerContextFailedToStart(), are called on the worker thread.
class WebServiceWorkerContextClient {
public:
+ virtual ~WebServiceWorkerContextClient() { }
+
// A new WorkerGlobalScope is created and started to run on the
// worker thread.
// This also gives back a proxy to the client to talk to the
@@ -52,13 +54,15 @@ public:
// after workerContextDestroyed() is called.
virtual void workerContextStarted(WebServiceWorkerContextProxy*) { }
- // WorkerGlobalScope.close() is called.
- virtual void workerContextClosed() { }
-
// WorkerGlobalScope is destroyed. The client should clear the
// WebServiceWorkerGlobalScopeProxy when this is called.
virtual void workerContextDestroyed() { }
+ // Starting worker context is failed. This could happen when loading
+ // worker script fails, or is asked to terminated before the context starts.
+ // This is called on the main thread.
+ virtual void workerContextFailedToStart() { }
+
virtual void dispatchDevToolsMessage(const WebString&) { }
virtual void saveDevToolsAgentState(const WebString&) { }
};
« no previous file with comments | « public/web/WebEmbeddedWorkerStartData.h ('k') | public/web/WebServiceWorkerContextProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698