| Index: content/browser/service_worker/embedded_worker_instance.h
|
| diff --git a/content/browser/service_worker/embedded_worker_instance.h b/content/browser/service_worker/embedded_worker_instance.h
|
| index 99849f3fa86960dfb34c4a76be0b55866c3c192d..20acf34ae2eb9a52402ddc03f252c599930f6331 100644
|
| --- a/content/browser/service_worker/embedded_worker_instance.h
|
| +++ b/content/browser/service_worker/embedded_worker_instance.h
|
| @@ -56,6 +56,7 @@ class CONTENT_EXPORT EmbeddedWorkerInstance {
|
| class Listener {
|
| public:
|
| virtual ~Listener() {}
|
| + virtual void OnScriptLoaded() {}
|
| virtual void OnStarted() {}
|
| virtual void OnStopped(Status old_status) {}
|
| virtual void OnPausedAfterDownload() {}
|
| @@ -77,9 +78,8 @@ class CONTENT_EXPORT EmbeddedWorkerInstance {
|
| ~EmbeddedWorkerInstance();
|
|
|
| // Starts the worker. It is invalid to call this when the worker is not in
|
| - // STOPPED status. |callback| is invoked when the worker's process is created
|
| - // if necessary and the IPC to evaluate the worker's script is sent.
|
| - // Observer::OnStarted() is run when the worker is actually started.
|
| + // STOPPED status. |callback| is invoked after the worker script has been
|
| + // started and evaluated, or when an error occurs.
|
| void Start(int64 service_worker_version_id,
|
| const GURL& scope,
|
| const GURL& script_url,
|
| @@ -162,11 +162,12 @@ class CONTENT_EXPORT EmbeddedWorkerInstance {
|
| void OnScriptLoadFailed();
|
|
|
| // Called back from Registry when the worker instance has ack'ed that
|
| - // it finished evaluating the script.
|
| + // it finished evaluating the script. This is called before OnStarted.
|
| void OnScriptEvaluated(bool success);
|
|
|
| - // Called back from Registry when the worker instance has ack'ed that
|
| - // its WorkerGlobalScope is actually started and parsed.
|
| + // Called back from Registry when the worker instance has ack'ed that its
|
| + // WorkerGlobalScope has actually started and evaluated the script. This is
|
| + // called after OnScriptEvaluated.
|
| // This will change the internal status from STARTING to RUNNING.
|
| void OnStarted();
|
|
|
|
|