diff options
Diffstat (limited to 'chrome/worker/webworkerclient_proxy.cc')
-rw-r--r-- | chrome/worker/webworkerclient_proxy.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/chrome/worker/webworkerclient_proxy.cc b/chrome/worker/webworkerclient_proxy.cc index ac061f4..18ed954 100644 --- a/chrome/worker/webworkerclient_proxy.cc +++ b/chrome/worker/webworkerclient_proxy.cc @@ -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 @@ using WebKit::WebWorkerClient; 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,8 +105,19 @@ void WebWorkerClientProxy::workerContextDestroyed() { 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) { |