summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-13 18:24:46 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-13 18:24:46 +0000
commit19251afae2abfbf9703103e8bbb715146582cff7 (patch)
tree2dd403a51420b18d45303b36606a54e45a3ca561 /chrome/common
parentc573f48ce5560c07aa321aea0b9a90ded0690aa6 (diff)
downloadchromium_src-19251afae2abfbf9703103e8bbb715146582cff7.zip
chromium_src-19251afae2abfbf9703103e8bbb715146582cff7.tar.gz
chromium_src-19251afae2abfbf9703103e8bbb715146582cff7.tar.bz2
Define two new IPC messages to initialize an appcache for a shared worker or a dedicated worker. There is no callsite for sending these messages yet, and there are no handlers for them either.
BUG=39368 TEST=nothing to test yet Review URL: http://codereview.chromium.org/2037013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/appcache/appcache_backend_proxy.cc13
-rw-r--r--chrome/common/appcache/appcache_backend_proxy.h7
-rw-r--r--chrome/common/render_messages_internal.h9
3 files changed, 29 insertions, 0 deletions
diff --git a/chrome/common/appcache/appcache_backend_proxy.cc b/chrome/common/appcache/appcache_backend_proxy.cc
index 25c77f7..e1776db 100644
--- a/chrome/common/appcache/appcache_backend_proxy.cc
+++ b/chrome/common/appcache/appcache_backend_proxy.cc
@@ -25,6 +25,19 @@ void AppCacheBackendProxy::SelectCache(
manifest_url));
}
+void AppCacheBackendProxy::SelectCacheForWorker(
+ int host_id, int parent_process_id, int parent_host_id) {
+ sender_->Send(new AppCacheMsg_SelectCacheForWorker(
+ host_id, parent_process_id,
+ parent_host_id));
+}
+
+void AppCacheBackendProxy::SelectCacheForSharedWorker(
+ int host_id, int64 appcache_id) {
+ sender_->Send(new AppCacheMsg_SelectCacheForSharedWorker(
+ host_id, appcache_id));
+}
+
void AppCacheBackendProxy::MarkAsForeignEntry(
int host_id, const GURL& document_url,
int64 cache_document_was_loaded_from) {
diff --git a/chrome/common/appcache/appcache_backend_proxy.h b/chrome/common/appcache/appcache_backend_proxy.h
index 5098336..2ef2660 100644
--- a/chrome/common/appcache/appcache_backend_proxy.h
+++ b/chrome/common/appcache/appcache_backend_proxy.h
@@ -23,6 +23,13 @@ class AppCacheBackendProxy : public appcache::AppCacheBackend {
const GURL& document_url,
const int64 cache_document_was_loaded_from,
const GURL& manifest_url);
+ virtual void SelectCacheForWorker(
+ int host_id,
+ int parent_process_id,
+ int parent_host_id);
+ virtual void SelectCacheForSharedWorker(
+ int host_id,
+ int64 appcache_id);
virtual void MarkAsForeignEntry(int host_id, const GURL& document_url,
int64 cache_document_was_loaded_from);
virtual appcache::Status GetStatus(int host_id);
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 2bd9864..109c8b7 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -1785,6 +1785,15 @@ IPC_BEGIN_MESSAGES(ViewHost)
int64 /* appcache_document_was_loaded_from */,
GURL /* opt_manifest_url */)
+ // Initiates worker specific cache selection algorithm for the given host.
+ IPC_MESSAGE_CONTROL3(AppCacheMsg_SelectCacheForWorker,
+ int /* host_id */,
+ int /* parent_process_id */,
+ int /* parent_host_id */)
+ IPC_MESSAGE_CONTROL2(AppCacheMsg_SelectCacheForSharedWorker,
+ int /* host_id */,
+ int64 /* appcache_id */)
+
// Informs the browser of a 'foreign' entry in an appcache.
IPC_MESSAGE_CONTROL3(AppCacheMsg_MarkAsForeignEntry,
int /* host_id */,