Chromium Code Reviews| Index: public/web/WebServiceWorkerContextClient.h |
| diff --git a/public/web/WebServiceWorkerContextClient.h b/public/web/WebServiceWorkerContextClient.h |
| index 4ee02d16431aa2dc26f6eaea9e63421a24cd38e7..67295e989a05531624627113e96630e4514da051 100644 |
| --- a/public/web/WebServiceWorkerContextClient.h |
| +++ b/public/web/WebServiceWorkerContextClient.h |
| @@ -40,10 +40,13 @@ 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. Once workerContextStarted is called |
| +// (and this should be called first in the normal case) all methods of this |
|
michaeln
2013/11/21 02:00:40
The contract for these callbacks is squishy. It mi
kinuko
2013/11/21 06:36:05
Sounds good, done.
|
| +// class 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 |
| @@ -57,8 +60,15 @@ public: |
| // WorkerGlobalScope is destroyed. The client should clear the |
| // WebServiceWorkerGlobalScopeProxy when this is called. |
| + // This may be called on the main thread before WorkerContextStarted is |
| + // called if the worker context is asked to terminate before loading the |
| + // script finishes. |
| virtual void workerContextDestroyed() { } |
| + // Loading WorkerGlobalScope is failed. This is called on the main thread |
| + // before WorkerContextStarted is called if loading the script fails. |
| + virtual void workerContextLoadFailed() { } |
| + |
| virtual void dispatchDevToolsMessage(const WebString&) { } |
| virtual void saveDevToolsAgentState(const WebString&) { } |
| }; |