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

Side by Side Diff: content/common/service_worker/service_worker_messages.h

Issue 379303002: Content blink::WebServiceWorkerCacheStorage implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remediation Created 6 years, 4 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
« no previous file with comments | « content/common/DEPS ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
8 #include <vector>
9
7 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
8 #include "content/common/service_worker/service_worker_status_code.h" 11 #include "content/common/service_worker/service_worker_status_code.h"
9 #include "content/common/service_worker/service_worker_types.h" 12 #include "content/common/service_worker/service_worker_types.h"
10 #include "ipc/ipc_message_macros.h" 13 #include "ipc/ipc_message_macros.h"
11 #include "ipc/ipc_param_traits.h" 14 #include "ipc/ipc_param_traits.h"
15 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h"
12 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" 16 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h"
13 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" 17 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h"
14 #include "url/gurl.h" 18 #include "url/gurl.h"
15 19
16 #undef IPC_MESSAGE_EXPORT 20 #undef IPC_MESSAGE_EXPORT
17 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
18 22
19 #define IPC_MESSAGE_START ServiceWorkerMsgStart 23 #define IPC_MESSAGE_START ServiceWorkerMsgStart
20 24
21 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerError::ErrorType, 25 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerError::ErrorType,
(...skipping 24 matching lines...) Expand all
46 IPC_STRUCT_TRAITS_MEMBER(blob_uuid) 50 IPC_STRUCT_TRAITS_MEMBER(blob_uuid)
47 IPC_STRUCT_TRAITS_END() 51 IPC_STRUCT_TRAITS_END()
48 52
49 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerObjectInfo) 53 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerObjectInfo)
50 IPC_STRUCT_TRAITS_MEMBER(handle_id) 54 IPC_STRUCT_TRAITS_MEMBER(handle_id)
51 IPC_STRUCT_TRAITS_MEMBER(scope) 55 IPC_STRUCT_TRAITS_MEMBER(scope)
52 IPC_STRUCT_TRAITS_MEMBER(url) 56 IPC_STRUCT_TRAITS_MEMBER(url)
53 IPC_STRUCT_TRAITS_MEMBER(state) 57 IPC_STRUCT_TRAITS_MEMBER(state)
54 IPC_STRUCT_TRAITS_END() 58 IPC_STRUCT_TRAITS_END()
55 59
60 IPC_ENUM_TRAITS_MAX_VALUE(
61 blink::WebServiceWorkerCacheError,
62 blink::WebServiceWorkerCacheErrorLast);
63
56 //--------------------------------------------------------------------------- 64 //---------------------------------------------------------------------------
57 // Messages sent from the child process to the browser. 65 // Messages sent from the child process to the browser.
58 66
59 IPC_MESSAGE_CONTROL5(ServiceWorkerHostMsg_RegisterServiceWorker, 67 IPC_MESSAGE_CONTROL5(ServiceWorkerHostMsg_RegisterServiceWorker,
60 int /* thread_id */, 68 int /* thread_id */,
61 int /* request_id */, 69 int /* request_id */,
62 int /* provider_id */, 70 int /* provider_id */,
63 GURL /* scope */, 71 GURL /* scope */,
64 GURL /* script_url */) 72 GURL /* script_url */)
65 73
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // ServiceWorker. 128 // ServiceWorker.
121 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_GetClientDocuments, 129 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_GetClientDocuments,
122 int /* request_id */) 130 int /* request_id */)
123 131
124 // Sends a 'message' event to a client document (renderer->browser). 132 // Sends a 'message' event to a client document (renderer->browser).
125 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_PostMessageToDocument, 133 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_PostMessageToDocument,
126 int /* client_id */, 134 int /* client_id */,
127 base::string16 /* message */, 135 base::string16 /* message */,
128 std::vector<int> /* sent_message_port_ids */) 136 std::vector<int> /* sent_message_port_ids */)
129 137
138 // CacheStorage operations in the browser.
139 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageGet,
140 int /* request_id */,
141 base::string16 /* fetch_store_name */)
142
143 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageHas,
144 int /* request_id */,
145 base::string16 /* fetch_store_name */)
146
147 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageCreate,
148 int /* request_id */,
149 base::string16 /* fetch_store_name */)
150
151 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageDelete,
152 int /* request_id */,
153 base::string16 /* fetch_store_name */)
154
155 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheStorageKeys,
156 int /* request_id */)
157
130 //--------------------------------------------------------------------------- 158 //---------------------------------------------------------------------------
131 // Messages sent from the browser to the child process. 159 // Messages sent from the browser to the child process.
132 // 160 //
133 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have 161 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have
134 // a thread_id as their first field so that ServiceWorkerMessageFilter can 162 // a thread_id as their first field so that ServiceWorkerMessageFilter can
135 // extract it and dispatch the message to the correct ServiceWorkerDispatcher 163 // extract it and dispatch the message to the correct ServiceWorkerDispatcher
136 // on the correct thread. 164 // on the correct thread.
137 165
138 // Response to ServiceWorkerMsg_RegisterServiceWorker. 166 // Response to ServiceWorkerMsg_RegisterServiceWorker.
139 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered, 167 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 std::string /* data */) 240 std::string /* data */)
213 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_MessageToWorker, 241 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_MessageToWorker,
214 base::string16 /* message */, 242 base::string16 /* message */,
215 std::vector<int> /* sent_message_port_ids */, 243 std::vector<int> /* sent_message_port_ids */,
216 std::vector<int> /* new_routing_ids */) 244 std::vector<int> /* new_routing_ids */)
217 245
218 // Sent via EmbeddedWorker as a response of GetClientDocuments. 246 // Sent via EmbeddedWorker as a response of GetClientDocuments.
219 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_DidGetClientDocuments, 247 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_DidGetClientDocuments,
220 int /* request_id */, 248 int /* request_id */,
221 std::vector<int> /* client_ids */) 249 std::vector<int> /* client_ids */)
250
251 // Sent via EmbeddedWorker at successful completion of CacheStorage operations.
252 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageGetSuccess,
253 int /* request_id */,
254 int /* fetch_store_id */)
255 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_CacheStorageHasSuccess,
256 int /* request_id */)
257 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageCreateSuccess,
258 int /* request_id */,
259 int /* fetch_store_id */)
260 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_CacheStorageDeleteSuccess,
261 int /* request_id */)
262 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysSuccess,
263 int /* request_id */,
264 std::vector<base::string16> /* keys */)
265
266 // Sent via EmbeddedWorker at erroneous completion of CacheStorage operations.
267 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageGetError,
268 int /* request_id */,
269 blink::WebServiceWorkerCacheError /* reason */)
270 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageHasError,
271 int /* request_id */,
272 blink::WebServiceWorkerCacheError /* reason */)
273 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageCreateError,
274 int /* request_id */,
275 blink::WebServiceWorkerCacheError /* reason */)
276 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageDeleteError,
277 int /* request_id */,
278 blink::WebServiceWorkerCacheError /* reason */)
279 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysError,
280 int /* request_id */,
281 blink::WebServiceWorkerCacheError /* reason */)
OLDNEW
« no previous file with comments | « content/common/DEPS ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698