OLD | NEW |
---|---|
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> | |
gavinp
2014/07/28 02:46:09
Lint pointed out that these were missing, and I ha
| |
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/WebServiceWorkerCacheStorageError.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 Loading... | |
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::WebServiceWorkerCacheStorageError, | |
62 blink::WebServiceWorkerCacheStorageErrorLast); | |
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 Loading... | |
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_CacheStorageCreate, | |
140 int /* request_id */, | |
141 base::string16 /* key */) | |
142 | |
143 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_CacheStorageRename, | |
144 int /* request_id */, | |
145 base::string16 /* oldKey */, | |
146 base::string16 /* newKey */) | |
147 | |
148 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageGet, | |
149 int /* request_id */, | |
150 base::string16 /* key */) | |
151 | |
152 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageDelete, | |
153 int /* request_id */, | |
154 base::string16 /* key */) | |
155 | |
156 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheStorageKeys, | |
157 int /* request_id */) | |
158 | |
130 //--------------------------------------------------------------------------- | 159 //--------------------------------------------------------------------------- |
131 // Messages sent from the browser to the child process. | 160 // Messages sent from the browser to the child process. |
132 // | 161 // |
133 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have | 162 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have |
134 // a thread_id as their first field so that ServiceWorkerMessageFilter can | 163 // a thread_id as their first field so that ServiceWorkerMessageFilter can |
135 // extract it and dispatch the message to the correct ServiceWorkerDispatcher | 164 // extract it and dispatch the message to the correct ServiceWorkerDispatcher |
136 // on the correct thread. | 165 // on the correct thread. |
137 | 166 |
138 // Response to ServiceWorkerMsg_RegisterServiceWorker. | 167 // Response to ServiceWorkerMsg_RegisterServiceWorker. |
139 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered, | 168 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
212 std::string /* data */) | 241 std::string /* data */) |
213 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_MessageToWorker, | 242 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_MessageToWorker, |
214 base::string16 /* message */, | 243 base::string16 /* message */, |
215 std::vector<int> /* sent_message_port_ids */, | 244 std::vector<int> /* sent_message_port_ids */, |
216 std::vector<int> /* new_routing_ids */) | 245 std::vector<int> /* new_routing_ids */) |
217 | 246 |
218 // Sent via EmbeddedWorker as a response of GetClientDocuments. | 247 // Sent via EmbeddedWorker as a response of GetClientDocuments. |
219 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_DidGetClientDocuments, | 248 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_DidGetClientDocuments, |
220 int /* request_id */, | 249 int /* request_id */, |
221 std::vector<int> /* client_ids */) | 250 std::vector<int> /* client_ids */) |
251 | |
252 // Sent via EmbeddedWorker at successful completion of CacheStorage operations. | |
253 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageCreateSuccess, | |
254 int /* request_id */, | |
255 int /* cache_id */) | |
256 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_CacheStorageRenameSuccess, | |
257 int /* request_id */) | |
258 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageGetSuccess, | |
259 int /* request_id */, | |
260 int /* cache_id */) | |
261 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_CacheStorageDeleteSuccess, | |
262 int /* request_id */) | |
263 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysSuccess, | |
264 int /* request_id */, | |
265 std::vector<base::string16> /* keys */) | |
266 | |
267 // Sent via EmbeddedWorker at erroneous completion of CacheStorage operations. | |
268 IPC_MESSAGE_CONTROL2( | |
269 ServiceWorkerMsg_CacheStorageCreateError, | |
270 int /* request_id */, | |
271 blink::WebServiceWorkerCacheStorageError /* reason */) | |
272 IPC_MESSAGE_CONTROL2( | |
273 ServiceWorkerMsg_CacheStorageRenameError, | |
274 int /* request_id */, | |
275 blink::WebServiceWorkerCacheStorageError /* reason */) | |
276 IPC_MESSAGE_CONTROL2( | |
277 ServiceWorkerMsg_CacheStorageGetError, | |
278 int /* request_id */, | |
279 blink::WebServiceWorkerCacheStorageError /* reason */) | |
280 IPC_MESSAGE_CONTROL2( | |
281 ServiceWorkerMsg_CacheStorageDeleteError, | |
282 int /* request_id */, | |
283 blink::WebServiceWorkerCacheStorageError /* reason */) | |
284 IPC_MESSAGE_CONTROL2( | |
285 ServiceWorkerMsg_CacheStorageKeysError, | |
286 int /* request_id */, | |
287 blink::WebServiceWorkerCacheStorageError /* reason */) | |
OLD | NEW |