diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-08 00:32:44 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-08 00:32:44 +0000 |
commit | 07331d79c72e07472722ed527ddfb3ac7f0b2c15 (patch) | |
tree | 51093c3e27efb1140d93282fa087723a01d23619 /chrome/worker/webworkerclient_proxy.cc | |
parent | a0c7147644ac9b90c1730916bdab70d602a40fc9 (diff) | |
download | chromium_src-07331d79c72e07472722ed527ddfb3ac7f0b2c15.zip chromium_src-07331d79c72e07472722ed527ddfb3ac7f0b2c15.tar.gz chromium_src-07331d79c72e07472722ed527ddfb3ac7f0b2c15.tar.bz2 |
Add some more IPC plumbing and scaffolding to support having appcache work in workers. Everything is still stubbed out at runtime (runtime feature is still disabled in the worker process, and the values in the IPC messages are all zero'd out).
* Widen the CreateWorker IPC message sent from the browser to the worker process to contain additional data needed to initialize an appcache for that worker.
* Add a new worker specific WorkerWebApplicationCacheHostImpl class and instantiate one with the initialization data received in the IPC.
* Give the WorkerThread an AppCacheDispatcher.
* Propagate the cmd-line argument to disable the appcache to the worker process.
* Fixup DEPs to show that chrome/workers depends on webkit/appcache
BUG=39368
TEST=thinking about what tests to put together for this CL
Review URL: http://codereview.chromium.org/1719007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46765 0039d316-1c4b-4281-b951-d872f2087c98
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) { |