summaryrefslogtreecommitdiffstats
path: root/webkit/appcache
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-27 22:43:19 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-27 22:43:19 +0000
commite5390a4d7d04cf148ace753239662a1bb32e5e4a (patch)
tree53192f394861d20aa36f80a96ced884f4ae3893d /webkit/appcache
parentfdb244d98291c7f801bb0a36c06de4a71b4895ae (diff)
downloadchromium_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 'webkit/appcache')
-rw-r--r--webkit/appcache/appcache_backend_impl.cc20
-rw-r--r--webkit/appcache/appcache_backend_impl.h3
-rw-r--r--webkit/appcache/web_application_cache_host_impl.h2
3 files changed, 25 insertions, 0 deletions
diff --git a/webkit/appcache/appcache_backend_impl.cc b/webkit/appcache/appcache_backend_impl.cc
index 7e3bcd2..6bacc26 100644
--- a/webkit/appcache/appcache_backend_impl.cc
+++ b/webkit/appcache/appcache_backend_impl.cc
@@ -61,6 +61,26 @@ bool AppCacheBackendImpl::SelectCache(
return true;
}
+bool AppCacheBackendImpl::SelectCacheForWorker(
+ int host_id, int parent_process_id, int parent_host_id) {
+ AppCacheHost* host = GetHost(host_id);
+ if (!host)
+ return false;
+
+ host->SelectCacheForWorker(parent_process_id, parent_host_id);
+ return true;
+}
+
+bool AppCacheBackendImpl::SelectCacheForSharedWorker(
+ int host_id, int64 appcache_id) {
+ AppCacheHost* host = GetHost(host_id);
+ if (!host)
+ return false;
+
+ host->SelectCacheForSharedWorker(appcache_id);
+ return true;
+}
+
bool AppCacheBackendImpl::MarkAsForeignEntry(
int host_id,
const GURL& document_url,
diff --git a/webkit/appcache/appcache_backend_impl.h b/webkit/appcache/appcache_backend_impl.h
index 00385e5e..b957ae3 100644
--- a/webkit/appcache/appcache_backend_impl.h
+++ b/webkit/appcache/appcache_backend_impl.h
@@ -32,6 +32,9 @@ class AppCacheBackendImpl {
const GURL& document_url,
const int64 cache_document_was_loaded_from,
const GURL& manifest_url);
+ bool SelectCacheForWorker(int host_id, int parent_process_id,
+ int parent_host_id);
+ bool SelectCacheForSharedWorker(int host_id, int64 appcache_id);
bool MarkAsForeignEntry(int host_id, const GURL& document_url,
int64 cache_document_was_loaded_from);
bool GetStatusWithCallback(int host_id, GetStatusCallback* callback,
diff --git a/webkit/appcache/web_application_cache_host_impl.h b/webkit/appcache/web_application_cache_host_impl.h
index 7d7060c..ccba47e 100644
--- a/webkit/appcache/web_application_cache_host_impl.h
+++ b/webkit/appcache/web_application_cache_host_impl.h
@@ -29,6 +29,8 @@ class WebApplicationCacheHostImpl : public WebKit::WebApplicationCacheHost {
virtual ~WebApplicationCacheHostImpl();
int host_id() const { return host_id_; }
+ AppCacheBackend* backend() const { return backend_; }
+ WebKit::WebApplicationCacheHostClient* client() const { return client_; }
void OnCacheSelected(int64 selected_cache_id, appcache::Status status);
void OnStatusChanged(appcache::Status);