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

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 on new header type Created 6 years, 2 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 int /* request_id */, 192 int /* request_id */,
176 base::string16 /* fetch_store_name */) 193 base::string16 /* fetch_store_name */)
177 194
178 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageDelete, 195 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageDelete,
179 int /* request_id */, 196 int /* request_id */,
180 base::string16 /* fetch_store_name */) 197 base::string16 /* fetch_store_name */)
181 198
182 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheStorageKeys, 199 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheStorageKeys,
183 int /* request_id */) 200 int /* request_id */)
184 201
202 // Cache operations in the browser.
203 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheMatch,
204 int /* request_id */,
205 int /* cache_id */,
206 content::ServiceWorkerFetchRequest,
207 content::ServiceWorkerCacheQueryParams)
208
209 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheMatchAll,
210 int /* request_id */,
211 int /* cache_id */,
212 content::ServiceWorkerFetchRequest,
213 content::ServiceWorkerCacheQueryParams)
214
215 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheKeys,
216 int /* request_id */,
217 int /* cache_id */,
218 content::ServiceWorkerFetchRequest,
219 content::ServiceWorkerCacheQueryParams);
220
221 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_CacheBatch,
222 int /* request_id */,
223 int /* cache_id */,
224 std::vector<content::ServiceWorkerBatchOperation>);
225
226 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheClosed,
227 int /* cache_id */);
228
185 //--------------------------------------------------------------------------- 229 //---------------------------------------------------------------------------
186 // Messages sent from the browser to the child process. 230 // Messages sent from the browser to the child process.
187 // 231 //
188 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have 232 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have
189 // a thread_id as their first field so that ServiceWorkerMessageFilter can 233 // a thread_id as their first field so that ServiceWorkerMessageFilter can
190 // extract it and dispatch the message to the correct ServiceWorkerDispatcher 234 // extract it and dispatch the message to the correct ServiceWorkerDispatcher
191 // on the correct thread. 235 // on the correct thread.
192 236
193 // Informs the child process that the given provider gets associated or 237 // Informs the child process that the given provider gets associated or
194 // disassociated with the registration. 238 // disassociated with the registration.
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 blink::WebServiceWorkerCacheError /* reason */) 372 blink::WebServiceWorkerCacheError /* reason */)
329 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageCreateError, 373 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageCreateError,
330 int /* request_id */, 374 int /* request_id */,
331 blink::WebServiceWorkerCacheError /* reason */) 375 blink::WebServiceWorkerCacheError /* reason */)
332 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageDeleteError, 376 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageDeleteError,
333 int /* request_id */, 377 int /* request_id */,
334 blink::WebServiceWorkerCacheError /* reason */) 378 blink::WebServiceWorkerCacheError /* reason */)
335 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysError, 379 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysError,
336 int /* request_id */, 380 int /* request_id */,
337 blink::WebServiceWorkerCacheError /* reason */) 381 blink::WebServiceWorkerCacheError /* reason */)
382
383 // Sent via EmbeddedWorker at successful completion of Cache operations.
384 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchSuccess,
385 int /* request_id */,
386 content::ServiceWorkerResponse)
387 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllSuccess,
388 int /* request_id */,
389 std::vector<content::ServiceWorkerResponse>)
390 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysSuccess,
391 int /* request_id */,
392 std::vector<content::ServiceWorkerFetchRequest>)
393 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchSuccess,
394 int /* request_id */,
395 std::vector<content::ServiceWorkerResponse>)
396
397 // Sent via EmbeddedWorker at erroneous completion of CacheStorage operations.
398 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchError,
399 int /* request_id */,
400 blink::WebServiceWorkerCacheError)
401 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllError,
402 int /* request_id */,
403 blink::WebServiceWorkerCacheError)
404 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysError,
405 int /* request_id */,
406 blink::WebServiceWorkerCacheError)
407 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchError,
408 int /* request_id */,
409 blink::WebServiceWorkerCacheError)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698