Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1003)

Unified Diff: content/common/service_worker/service_worker_messages.h

Issue 474593002: content::WebServiceWorkerCache implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 f940d06a48eabd2335a4da61eccb50f18f30ea70..e882850ab244918e3d822b796473e5632c7583e4 100644
--- a/content/common/service_worker/service_worker_messages.h
+++ b/content/common/service_worker/service_worker_messages.h
@@ -52,6 +52,23 @@ IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerResponse)
IPC_STRUCT_TRAITS_MEMBER(blob_uuid)
IPC_STRUCT_TRAITS_END()
+IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerCacheQueryParams)
+ IPC_STRUCT_TRAITS_MEMBER(ignore_search)
+ IPC_STRUCT_TRAITS_MEMBER(ignore_method)
+ IPC_STRUCT_TRAITS_MEMBER(ignore_vary)
+ IPC_STRUCT_TRAITS_MEMBER(prefix_match)
+IPC_STRUCT_TRAITS_END()
+
+IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerCacheOperationType,
+ content::SERVICE_WORKER_CACHE_OPERATION_TYPE_LAST)
+
+IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerBatchOperation)
+ IPC_STRUCT_TRAITS_MEMBER(operation_type)
+ IPC_STRUCT_TRAITS_MEMBER(request)
+ IPC_STRUCT_TRAITS_MEMBER(response)
+ IPC_STRUCT_TRAITS_MEMBER(match_params)
+IPC_STRUCT_TRAITS_END()
+
IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerObjectInfo)
IPC_STRUCT_TRAITS_MEMBER(handle_id)
IPC_STRUCT_TRAITS_MEMBER(scope)
@@ -176,6 +193,35 @@ IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageDelete,
IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheStorageKeys,
int /* request_id */)
+// Cache operations in the browser.
+IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheMatch,
michaeln 2014/09/06 00:56:41 The embedded worker routed message passing scheme
+ int /* request_id */,
+ int /* cache_id */,
+ content::ServiceWorkerFetchRequest,
+ content::ServiceWorkerCacheQueryParams)
+
+IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheMatchAll,
michaeln 2014/09/06 00:56:41 Does it make sense to handle match and matchAll on
+ int /* request_id */,
+ int /* cache_id */,
+ content::ServiceWorkerFetchRequest,
+ content::ServiceWorkerCacheQueryParams)
+
+IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheKeys,
+ int /* request_id */,
+ int /* cache_id */,
+ content::ServiceWorkerFetchRequest,
+ content::ServiceWorkerCacheQueryParams);
+
+IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_CacheBatch,
+ int /* request_id */,
+ int /* cache_id */,
+ std::vector<content::ServiceWorkerBatchOperation>);
+
+// Called only once, at the final close, no matter how many times a cache has
+// been provided to a particular ServiceWorker.
michaeln 2014/09/06 00:56:41 Having this listener class be scope to a particula
+IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheClosed,
+ int /* cache_id */);
+
//---------------------------------------------------------------------------
// Messages sent from the browser to the child process.
//
@@ -302,3 +348,31 @@ IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageDeleteError,
IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysError,
int /* request_id */,
blink::WebServiceWorkerCacheError /* reason */)
+
+// Sent via EmbeddedWorker at successful completion of Cache operations.
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchSuccess,
+ int /* request_id */,
+ content::ServiceWorkerResponse)
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllSuccess,
+ int /* request_id */,
+ std::vector<content::ServiceWorkerResponse>)
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysSuccess,
+ int /* request_id */,
+ std::vector<content::ServiceWorkerFetchRequest>)
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchSuccess,
+ int /* request_id */,
+ std::vector<content::ServiceWorkerResponse>)
+
+// Sent via EmbeddedWorker at erroneous completion of CacheStorage operations.
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchError,
+ int /* request_id */,
+ blink::WebServiceWorkerCacheError)
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllError,
+ int /* request_id */,
+ blink::WebServiceWorkerCacheError)
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysError,
+ int /* request_id */,
+ blink::WebServiceWorkerCacheError)
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchError,
+ int /* request_id */,
+ blink::WebServiceWorkerCacheError)

Powered by Google App Engine
This is Rietveld 408576698