summaryrefslogtreecommitdiffstats
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
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
-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
-rw-r--r--webkit/appcache/appcache_interfaces.h11
-rw-r--r--webkit/tools/test_shell/simple_appcache_system.cc13
5 files changed, 51 insertions, 2 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 */,
diff --git a/webkit/appcache/appcache_interfaces.h b/webkit/appcache/appcache_interfaces.h
index 9736789..84132e3 100644
--- a/webkit/appcache/appcache_interfaces.h
+++ b/webkit/appcache/appcache_interfaces.h
@@ -44,7 +44,7 @@ enum EventID {
OBSOLETE_EVENT
};
-// Interface used by backend to talk to frontend.
+// Interface used by backend (browser-process) to talk to frontend (renderer).
class AppCacheFrontend {
public:
virtual void OnCacheSelected(int host_id, int64 cache_id ,
@@ -58,7 +58,7 @@ class AppCacheFrontend {
virtual ~AppCacheFrontend() {}
};
-// Interface used by frontend to talk to backend.
+// Interface used by frontend (renderer) to talk to backend (browser-process).
class AppCacheBackend {
public:
virtual void RegisterHost(int host_id) = 0;
@@ -67,6 +67,13 @@ class AppCacheBackend {
const GURL& document_url,
const int64 cache_document_was_loaded_from,
const GURL& manifest_url) = 0;
+ virtual void SelectCacheForWorker(
+ int host_id,
+ int parent_process_id,
+ int parent_host_id) = 0;
+ virtual void SelectCacheForSharedWorker(
+ int host_id,
+ int64 appcache_id) = 0;
virtual void MarkAsForeignEntry(int host_id, const GURL& document_url,
int64 cache_document_was_loaded_from) = 0;
virtual Status GetStatus(int host_id) = 0;
diff --git a/webkit/tools/test_shell/simple_appcache_system.cc b/webkit/tools/test_shell/simple_appcache_system.cc
index e1f6e38..79bc557 100644
--- a/webkit/tools/test_shell/simple_appcache_system.cc
+++ b/webkit/tools/test_shell/simple_appcache_system.cc
@@ -166,6 +166,19 @@ class SimpleBackendProxy
}
}
+ virtual void SelectCacheForWorker(
+ int host_id,
+ int parent_process_id,
+ int parent_host_id) {
+ NOTREACHED(); // Workers are not supported in test_shell.
+ }
+
+ virtual void SelectCacheForSharedWorker(
+ int host_id,
+ int64 appcache_id) {
+ NOTREACHED(); // Workers are not supported in test_shell.
+ }
+
virtual void MarkAsForeignEntry(int host_id, const GURL& document_url,
int64 cache_document_was_loaded_from) {
if (system_->is_ui_thread()) {