Index: content/common/service_worker/service_worker_messages.h |
diff --git a/content/common/service_worker/service_worker_messages.h b/content/common/service_worker/service_worker_messages.h |
index 7a917de9d022ee16c8c9861b5a4ab48cd641a0db..da326bbcc2f0b87fc70be95f858e83fdd4da652e 100644 |
--- a/content/common/service_worker/service_worker_messages.h |
+++ b/content/common/service_worker/service_worker_messages.h |
@@ -4,11 +4,15 @@ |
// Message definition file, included multiple times, hence no include guard. |
+#include <string> |
+#include <vector> |
+ |
#include "base/strings/string16.h" |
#include "content/common/service_worker/service_worker_status_code.h" |
#include "content/common/service_worker/service_worker_types.h" |
#include "ipc/ipc_message_macros.h" |
#include "ipc/ipc_param_traits.h" |
+#include "third_party/WebKit/public/platform/WebServiceWorkerCacheStorageError.h" |
#include "third_party/WebKit/public/platform/WebServiceWorkerError.h" |
#include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" |
#include "url/gurl.h" |
@@ -53,6 +57,10 @@ IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerObjectInfo) |
IPC_STRUCT_TRAITS_MEMBER(state) |
IPC_STRUCT_TRAITS_END() |
+IPC_ENUM_TRAITS_MAX_VALUE( |
+ blink::WebServiceWorkerCacheStorageError, |
+ blink::WebServiceWorkerCacheStorageErrorLast); |
+ |
//--------------------------------------------------------------------------- |
// Messages sent from the child process to the browser. |
@@ -127,6 +135,27 @@ IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_PostMessageToDocument, |
base::string16 /* message */, |
std::vector<int> /* sent_message_port_ids */) |
+// CacheStorage operations in the browser. |
+IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageCreate, |
+ int /* request_id */, |
+ base::string16 /* key */) |
+ |
+IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_CacheStorageRename, |
+ int /* request_id */, |
+ base::string16 /* oldKey */, |
+ base::string16 /* newKey */) |
+ |
+IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageGet, |
+ int /* request_id */, |
+ base::string16 /* key */) |
+ |
+IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageDelete, |
+ int /* request_id */, |
+ base::string16 /* key */) |
+ |
+IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheStorageKeys, |
+ int /* request_id */) |
+ |
//--------------------------------------------------------------------------- |
// Messages sent from the browser to the child process. |
// |
@@ -219,3 +248,40 @@ IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_MessageToWorker, |
IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_DidGetClientDocuments, |
int /* request_id */, |
std::vector<int> /* client_ids */) |
+ |
+// Sent via EmbeddedWorker at successful completion of CacheStorage operations. |
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageCreateSuccess, |
+ int /* request_id */, |
+ int /* cache_id */) |
+IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_CacheStorageRenameSuccess, |
+ int /* request_id */) |
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageGetSuccess, |
+ int /* request_id */, |
+ int /* cache_id */) |
+IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_CacheStorageDeleteSuccess, |
+ int /* request_id */) |
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysSuccess, |
+ int /* request_id */, |
+ std::vector<base::string16> /* keys */) |
+ |
+// Sent via EmbeddedWorker at erroneous completion of CacheStorage operations. |
+IPC_MESSAGE_CONTROL2( |
+ ServiceWorkerMsg_CacheStorageCreateError, |
+ int /* request_id */, |
+ blink::WebServiceWorkerCacheStorageError /* reason */) |
+IPC_MESSAGE_CONTROL2( |
+ ServiceWorkerMsg_CacheStorageRenameError, |
+ int /* request_id */, |
+ blink::WebServiceWorkerCacheStorageError /* reason */) |
+IPC_MESSAGE_CONTROL2( |
+ ServiceWorkerMsg_CacheStorageGetError, |
+ int /* request_id */, |
+ blink::WebServiceWorkerCacheStorageError /* reason */) |
+IPC_MESSAGE_CONTROL2( |
+ ServiceWorkerMsg_CacheStorageDeleteError, |
+ int /* request_id */, |
+ blink::WebServiceWorkerCacheStorageError /* reason */) |
+IPC_MESSAGE_CONTROL2( |
+ ServiceWorkerMsg_CacheStorageKeysError, |
+ int /* request_id */, |
+ blink::WebServiceWorkerCacheStorageError /* reason */) |