| Index: chrome/worker/webworkerclient_proxy.cc
|
| ===================================================================
|
| --- chrome/worker/webworkerclient_proxy.cc (revision 46627)
|
| +++ chrome/worker/webworkerclient_proxy.cc (working copy)
|
| @@ -11,11 +11,13 @@
|
| #include "chrome/renderer/webworker_proxy.h"
|
| #include "chrome/worker/webworker_stub_base.h"
|
| #include "chrome/worker/worker_thread.h"
|
| +#include "chrome/worker/worker_webapplicationcachehost_impl.h"
|
| #include "ipc/ipc_logging.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebString.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebWorker.h"
|
|
|
| +using WebKit::WebApplicationCacheHost;
|
| using WebKit::WebMessagePortChannel;
|
| using WebKit::WebMessagePortChannelArray;
|
| using WebKit::WebString;
|
| @@ -28,6 +30,7 @@
|
| WebWorkerClientProxy::WebWorkerClientProxy(int route_id,
|
| WebWorkerStubBase* stub)
|
| : route_id_(route_id),
|
| + appcache_host_id_(0),
|
| stub_(stub),
|
| ALLOW_THIS_IN_INITIALIZER_LIST(kill_process_factory_(this)) {
|
| }
|
| @@ -102,10 +105,21 @@
|
|
|
| WebKit::WebWorker* WebWorkerClientProxy::createWorker(
|
| WebKit::WebWorkerClient* client) {
|
| - return new WebWorkerProxy(client, WorkerThread::current(), 0, 0);
|
| - // TODO(michaeln): Fill in the appcache_host_id parameter value.
|
| + return new WebWorkerProxy(client, WorkerThread::current(),
|
| + 0, appcache_host_id_);
|
| }
|
|
|
| +WebApplicationCacheHost* WebWorkerClientProxy::createApplicationCacheHost(
|
| + WebKit::WebApplicationCacheHostClient* client) {
|
| + WorkerWebApplicationCacheHostImpl* host =
|
| + new WorkerWebApplicationCacheHostImpl(stub_->appcache_init_info(),
|
| + client);
|
| + // Remember the id of the instance we create so we have access to that
|
| + // value when creating nested dedicated workers in createWorker.
|
| + appcache_host_id_ = host->host_id();
|
| + return host;
|
| +}
|
| +
|
| bool WebWorkerClientProxy::Send(IPC::Message* message) {
|
| return WorkerThread::current()->Send(message);
|
| }
|
|
|