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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Message definition file, included multiple times, hence no include guard. 5 // Message definition file, included multiple times, hence no include guard.
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 content::SERVICE_WORKER_FETCH_EVENT_LAST) 45 content::SERVICE_WORKER_FETCH_EVENT_LAST)
46 46
47 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerResponse) 47 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerResponse)
48 IPC_STRUCT_TRAITS_MEMBER(url) 48 IPC_STRUCT_TRAITS_MEMBER(url)
49 IPC_STRUCT_TRAITS_MEMBER(status_code) 49 IPC_STRUCT_TRAITS_MEMBER(status_code)
50 IPC_STRUCT_TRAITS_MEMBER(status_text) 50 IPC_STRUCT_TRAITS_MEMBER(status_text)
51 IPC_STRUCT_TRAITS_MEMBER(headers) 51 IPC_STRUCT_TRAITS_MEMBER(headers)
52 IPC_STRUCT_TRAITS_MEMBER(blob_uuid) 52 IPC_STRUCT_TRAITS_MEMBER(blob_uuid)
53 IPC_STRUCT_TRAITS_END() 53 IPC_STRUCT_TRAITS_END()
54 54
55 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerCacheQueryParams)
56 IPC_STRUCT_TRAITS_MEMBER(ignore_search)
57 IPC_STRUCT_TRAITS_MEMBER(ignore_method)
58 IPC_STRUCT_TRAITS_MEMBER(ignore_vary)
59 IPC_STRUCT_TRAITS_MEMBER(prefix_match)
60 IPC_STRUCT_TRAITS_END()
61
62 IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerCacheOperationType,
63 content::SERVICE_WORKER_CACHE_OPERATION_TYPE_LAST)
64
65 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerBatchOperation)
66 IPC_STRUCT_TRAITS_MEMBER(operation_type)
67 IPC_STRUCT_TRAITS_MEMBER(request)
68 IPC_STRUCT_TRAITS_MEMBER(response)
69 IPC_STRUCT_TRAITS_MEMBER(match_params)
70 IPC_STRUCT_TRAITS_END()
71
55 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerObjectInfo) 72 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerObjectInfo)
56 IPC_STRUCT_TRAITS_MEMBER(handle_id) 73 IPC_STRUCT_TRAITS_MEMBER(handle_id)
57 IPC_STRUCT_TRAITS_MEMBER(scope) 74 IPC_STRUCT_TRAITS_MEMBER(scope)
58 IPC_STRUCT_TRAITS_MEMBER(url) 75 IPC_STRUCT_TRAITS_MEMBER(url)
59 IPC_STRUCT_TRAITS_MEMBER(state) 76 IPC_STRUCT_TRAITS_MEMBER(state)
60 IPC_STRUCT_TRAITS_END() 77 IPC_STRUCT_TRAITS_END()
61 78
62 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerRegistrationObjectInfo) 79 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerRegistrationObjectInfo)
63 IPC_STRUCT_TRAITS_MEMBER(handle_id) 80 IPC_STRUCT_TRAITS_MEMBER(handle_id)
64 IPC_STRUCT_TRAITS_MEMBER(scope) 81 IPC_STRUCT_TRAITS_MEMBER(scope)
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 int /* request_id */, 186 int /* request_id */,
170 base::string16 /* fetch_store_name */) 187 base::string16 /* fetch_store_name */)
171 188
172 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageDelete, 189 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageDelete,
173 int /* request_id */, 190 int /* request_id */,
174 base::string16 /* fetch_store_name */) 191 base::string16 /* fetch_store_name */)
175 192
176 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheStorageKeys, 193 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheStorageKeys,
177 int /* request_id */) 194 int /* request_id */)
178 195
196 // Cache operations in the browser.
197 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheMatch,
michaeln 2014/09/06 00:56:41 The embedded worker routed message passing scheme
198 int /* request_id */,
199 int /* cache_id */,
200 content::ServiceWorkerFetchRequest,
201 content::ServiceWorkerCacheQueryParams)
202
203 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheMatchAll,
michaeln 2014/09/06 00:56:41 Does it make sense to handle match and matchAll on
204 int /* request_id */,
205 int /* cache_id */,
206 content::ServiceWorkerFetchRequest,
207 content::ServiceWorkerCacheQueryParams)
208
209 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheKeys,
210 int /* request_id */,
211 int /* cache_id */,
212 content::ServiceWorkerFetchRequest,
213 content::ServiceWorkerCacheQueryParams);
214
215 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_CacheBatch,
216 int /* request_id */,
217 int /* cache_id */,
218 std::vector<content::ServiceWorkerBatchOperation>);
219
220 // Called only once, at the final close, no matter how many times a cache has
221 // been provided to a particular ServiceWorker.
michaeln 2014/09/06 00:56:41 Having this listener class be scope to a particula
222 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheClosed,
223 int /* cache_id */);
224
179 //--------------------------------------------------------------------------- 225 //---------------------------------------------------------------------------
180 // Messages sent from the browser to the child process. 226 // Messages sent from the browser to the child process.
181 // 227 //
182 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have 228 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have
183 // a thread_id as their first field so that ServiceWorkerMessageFilter can 229 // a thread_id as their first field so that ServiceWorkerMessageFilter can
184 // extract it and dispatch the message to the correct ServiceWorkerDispatcher 230 // extract it and dispatch the message to the correct ServiceWorkerDispatcher
185 // on the correct thread. 231 // on the correct thread.
186 232
187 // Response to ServiceWorkerMsg_RegisterServiceWorker. 233 // Response to ServiceWorkerMsg_RegisterServiceWorker.
188 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistered, 234 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistered,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 blink::WebServiceWorkerCacheError /* reason */) 341 blink::WebServiceWorkerCacheError /* reason */)
296 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageCreateError, 342 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageCreateError,
297 int /* request_id */, 343 int /* request_id */,
298 blink::WebServiceWorkerCacheError /* reason */) 344 blink::WebServiceWorkerCacheError /* reason */)
299 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageDeleteError, 345 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageDeleteError,
300 int /* request_id */, 346 int /* request_id */,
301 blink::WebServiceWorkerCacheError /* reason */) 347 blink::WebServiceWorkerCacheError /* reason */)
302 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysError, 348 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysError,
303 int /* request_id */, 349 int /* request_id */,
304 blink::WebServiceWorkerCacheError /* reason */) 350 blink::WebServiceWorkerCacheError /* reason */)
351
352 // Sent via EmbeddedWorker at successful completion of Cache operations.
353 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchSuccess,
354 int /* request_id */,
355 content::ServiceWorkerResponse)
356 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllSuccess,
357 int /* request_id */,
358 std::vector<content::ServiceWorkerResponse>)
359 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysSuccess,
360 int /* request_id */,
361 std::vector<content::ServiceWorkerFetchRequest>)
362 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchSuccess,
363 int /* request_id */,
364 std::vector<content::ServiceWorkerResponse>)
365
366 // Sent via EmbeddedWorker at erroneous completion of CacheStorage operations.
367 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchError,
368 int /* request_id */,
369 blink::WebServiceWorkerCacheError)
370 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllError,
371 int /* request_id */,
372 blink::WebServiceWorkerCacheError)
373 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysError,
374 int /* request_id */,
375 blink::WebServiceWorkerCacheError)
376 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchError,
377 int /* request_id */,
378 blink::WebServiceWorkerCacheError)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698