diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-27 22:43:19 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-27 22:43:19 +0000 |
commit | e5390a4d7d04cf148ace753239662a1bb32e5e4a (patch) | |
tree | 53192f394861d20aa36f80a96ced884f4ae3893d /chrome/browser/renderer_host | |
parent | fdb244d98291c7f801bb0a36c06de4a71b4895ae (diff) | |
download | chromium_src-e5390a4d7d04cf148ace753239662a1bb32e5e4a.zip chromium_src-e5390a4d7d04cf148ace753239662a1bb32e5e4a.tar.gz chromium_src-e5390a4d7d04cf148ace753239662a1bb32e5e4a.tar.bz2 |
Fully connect the dots between workers and appcache resource loading.
* Split WorkerService CreateWorker into distinct methods for 'shared' vs 'dedicated' workers.
* Include additional appcache params in WorkerService CreateSharedWorker and CreateDedicatedWorker methods.
* Store those additional params in WorkerInstance object.
* Pass those additional params to the worker process.
* Use those additional params when initiating the appcache host for the worker when calling SelectCacheForWorker and SelectCacheForSharedWorker.
* Add browser process message handlers and dispatching for the SelectCacheForWorker and SelectCacheForSharedWorker IPC messages.
* Runtime enable the appcache feature in the worker processes.
BUG=39368
TEST=manual for now, but i need to create layout tests for this
Review URL: http://codereview.chromium.org/2238001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r-- | chrome/browser/renderer_host/resource_message_filter.cc | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 5e3b3c4..7319db1 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -824,11 +824,20 @@ void ResourceMessageFilter::OnCreateWorker( const ViewHostMsg_CreateWorker_Params& params, int* route_id) { *route_id = params.route_id != MSG_ROUTING_NONE ? params.route_id : render_widget_helper_->GetNextRoutingID(); - WorkerService::GetInstance()->CreateWorker( - params.url, params.is_shared, off_the_record(), params.name, - params.document_id, id(), params.render_view_route_id, this, *route_id, - static_cast<ChromeURLRequestContext*>( - request_context_->GetURLRequestContext())); + if (params.is_shared) + WorkerService::GetInstance()->CreateSharedWorker( + params.url, off_the_record(), params.name, + params.document_id, id(), params.render_view_route_id, this, *route_id, + params.script_resource_appcache_id, + static_cast<ChromeURLRequestContext*>( + request_context_->GetURLRequestContext())); + else + WorkerService::GetInstance()->CreateDedicatedWorker( + params.url, off_the_record(), + params.document_id, id(), params.render_view_route_id, this, *route_id, + id(), params.parent_appcache_host_id, + static_cast<ChromeURLRequestContext*>( + request_context_->GetURLRequestContext())); } void ResourceMessageFilter::OnLookupSharedWorker( |