| Index: content/worker/websharedworker_stub.h
|
| diff --git a/content/worker/websharedworker_stub.h b/content/worker/websharedworker_stub.h
|
| index c52813abadb8f6032a30c34833b7de9970703c77..c372fb29fcb7513bb22feed172b60f6207afeb01 100644
|
| --- a/content/worker/websharedworker_stub.h
|
| +++ b/content/worker/websharedworker_stub.h
|
| @@ -6,9 +6,11 @@
|
| #define CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_
|
| #pragma once
|
|
|
| -#include "content/worker/webworker_stub_base.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "content/worker/webworkerclient_proxy.h"
|
| +#include "content/worker/worker_webapplicationcachehost_impl.h"
|
| #include "googleurl/src/gurl.h"
|
| +#include "ipc/ipc_channel.h"
|
|
|
| namespace WebKit {
|
| class WebSharedWorker;
|
| @@ -18,7 +20,7 @@ class SharedWorkerDevToolsAgent;
|
|
|
| // This class creates a WebSharedWorker, and translates incoming IPCs to the
|
| // appropriate WebSharedWorker APIs.
|
| -class WebSharedWorkerStub : public WebWorkerStubBase {
|
| +class WebSharedWorkerStub : public IPC::Channel::Listener {
|
| public:
|
| WebSharedWorkerStub(const string16& name, int route_id,
|
| const WorkerAppCacheInitInfo& appcache_init_info);
|
| @@ -27,7 +29,22 @@ class WebSharedWorkerStub : public WebWorkerStubBase {
|
| virtual bool OnMessageReceived(const IPC::Message& message);
|
| virtual void OnChannelError();
|
|
|
| - virtual const GURL& url() const;
|
| + // Invoked when the WebWorkerClientProxy is shutting down.
|
| + void Shutdown();
|
| +
|
| + // Called after terminating the worker context to make sure that the worker
|
| + // actually terminates (is not stuck in an infinite loop).
|
| + void EnsureWorkerContextTerminates();
|
| +
|
| + WebWorkerClientProxy* client() { return &client_; }
|
| +
|
| + const WorkerAppCacheInitInfo& appcache_init_info() const {
|
| + return appcache_init_info_;
|
| + }
|
| +
|
| + // Returns the script url of this worker.
|
| + const GURL& url();
|
| +
|
|
|
| private:
|
| virtual ~WebSharedWorkerStub();
|
| @@ -37,6 +54,12 @@ class WebSharedWorkerStub : public WebWorkerStubBase {
|
| const GURL& url, const string16& user_agent, const string16& source_code);
|
| void OnTerminateWorkerContext();
|
|
|
| + int route_id_;
|
| + WorkerAppCacheInitInfo appcache_init_info_;
|
| +
|
| + // WebWorkerClient that responds to outgoing API calls from the worker object.
|
| + WebWorkerClientProxy client_;
|
| +
|
| WebKit::WebSharedWorker* impl_;
|
| string16 name_;
|
| bool started_;
|
|
|