| 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> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 IPC_STRUCT_TRAITS_MEMBER(url) | 58 IPC_STRUCT_TRAITS_MEMBER(url) |
| 59 IPC_STRUCT_TRAITS_MEMBER(state) | 59 IPC_STRUCT_TRAITS_MEMBER(state) |
| 60 IPC_STRUCT_TRAITS_END() | 60 IPC_STRUCT_TRAITS_END() |
| 61 | 61 |
| 62 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerRegistrationObjectInfo) | 62 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerRegistrationObjectInfo) |
| 63 IPC_STRUCT_TRAITS_MEMBER(handle_id) | 63 IPC_STRUCT_TRAITS_MEMBER(handle_id) |
| 64 IPC_STRUCT_TRAITS_MEMBER(scope) | 64 IPC_STRUCT_TRAITS_MEMBER(scope) |
| 65 IPC_STRUCT_TRAITS_END() | 65 IPC_STRUCT_TRAITS_END() |
| 66 | 66 |
| 67 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerVersionAttributes) | 67 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerVersionAttributes) |
| 68 IPC_STRUCT_TRAITS_MEMBER(changed_mask) |
| 68 IPC_STRUCT_TRAITS_MEMBER(installing) | 69 IPC_STRUCT_TRAITS_MEMBER(installing) |
| 69 IPC_STRUCT_TRAITS_MEMBER(waiting) | 70 IPC_STRUCT_TRAITS_MEMBER(waiting) |
| 70 IPC_STRUCT_TRAITS_MEMBER(active) | 71 IPC_STRUCT_TRAITS_MEMBER(active) |
| 71 IPC_STRUCT_TRAITS_END() | 72 IPC_STRUCT_TRAITS_END() |
| 72 | 73 |
| 73 IPC_ENUM_TRAITS_MAX_VALUE( | 74 IPC_ENUM_TRAITS_MAX_VALUE( |
| 74 blink::WebServiceWorkerCacheError, | 75 blink::WebServiceWorkerCacheError, |
| 75 blink::WebServiceWorkerCacheErrorLast) | 76 blink::WebServiceWorkerCacheErrorLast) |
| 76 | 77 |
| 77 //--------------------------------------------------------------------------- | 78 //--------------------------------------------------------------------------- |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 179 |
| 179 //--------------------------------------------------------------------------- | 180 //--------------------------------------------------------------------------- |
| 180 // Messages sent from the browser to the child process. | 181 // Messages sent from the browser to the child process. |
| 181 // | 182 // |
| 182 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have | 183 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have |
| 183 // a thread_id as their first field so that ServiceWorkerMessageFilter can | 184 // a thread_id as their first field so that ServiceWorkerMessageFilter can |
| 184 // extract it and dispatch the message to the correct ServiceWorkerDispatcher | 185 // extract it and dispatch the message to the correct ServiceWorkerDispatcher |
| 185 // on the correct thread. | 186 // on the correct thread. |
| 186 | 187 |
| 187 // Response to ServiceWorkerMsg_RegisterServiceWorker. | 188 // Response to ServiceWorkerMsg_RegisterServiceWorker. |
| 188 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered, | 189 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistered, |
| 189 int /* thread_id */, | 190 int /* thread_id */, |
| 190 int /* request_id */, | 191 int /* request_id */, |
| 191 content::ServiceWorkerRegistrationObjectInfo) | 192 content::ServiceWorkerRegistrationObjectInfo, |
| 193 content::ServiceWorkerVersionAttributes) |
| 192 | 194 |
| 193 // Response to ServiceWorkerMsg_UnregisterServiceWorker. | 195 // Response to ServiceWorkerMsg_UnregisterServiceWorker. |
| 194 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered, | 196 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered, |
| 195 int /* thread_id */, | 197 int /* thread_id */, |
| 196 int /* request_id */) | 198 int /* request_id */) |
| 197 | 199 |
| 198 // Sent when any kind of registration error occurs during a | 200 // Sent when any kind of registration error occurs during a |
| 199 // RegisterServiceWorker / UnregisterServiceWorker handler above. | 201 // RegisterServiceWorker / UnregisterServiceWorker handler above. |
| 200 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError, | 202 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError, |
| 201 int /* thread_id */, | 203 int /* thread_id */, |
| 202 int /* request_id */, | 204 int /* request_id */, |
| 203 blink::WebServiceWorkerError::ErrorType /* code */, | 205 blink::WebServiceWorkerError::ErrorType /* code */, |
| 204 base::string16 /* message */) | 206 base::string16 /* message */) |
| 205 | 207 |
| 206 // Informs the child process that the ServiceWorker's state has changed. | 208 // Informs the child process that the ServiceWorker's state has changed. |
| 207 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerStateChanged, | 209 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerStateChanged, |
| 208 int /* thread_id */, | 210 int /* thread_id */, |
| 209 int /* handle_id */, | 211 int /* handle_id */, |
| 210 blink::WebServiceWorkerState) | 212 blink::WebServiceWorkerState) |
| 211 | 213 |
| 212 // Tells the child process to set service workers for the given provider. | 214 // Tells the child process to set service workers for the given provider. |
| 213 IPC_MESSAGE_CONTROL5(ServiceWorkerMsg_SetVersionAttributes, | 215 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_SetVersionAttributes, |
| 214 int /* thread_id */, | 216 int /* thread_id */, |
| 215 int /* provider_id */, | 217 int /* provider_id */, |
| 216 int /* registration_handle_id */, | 218 int /* registration_handle_id */, |
| 217 int /* changed_mask */, | |
| 218 content::ServiceWorkerVersionAttributes) | 219 content::ServiceWorkerVersionAttributes) |
| 219 | 220 |
| 221 // Informs the child process that new ServiceWorker enters the installation |
| 222 // process. |
| 223 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_UpdateFound, |
| 224 int /* thread_id */, |
| 225 content::ServiceWorkerRegistrationObjectInfo) |
| 226 |
| 220 // Tells the child process to set the controller ServiceWorker for the given | 227 // Tells the child process to set the controller ServiceWorker for the given |
| 221 // provider. | 228 // provider. |
| 222 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_SetControllerServiceWorker, | 229 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_SetControllerServiceWorker, |
| 223 int /* thread_id */, | 230 int /* thread_id */, |
| 224 int /* provider_id */, | 231 int /* provider_id */, |
| 225 content::ServiceWorkerObjectInfo) | 232 content::ServiceWorkerObjectInfo) |
| 226 | 233 |
| 227 // Sends a 'message' event to a client document (browser->renderer). | 234 // Sends a 'message' event to a client document (browser->renderer). |
| 228 IPC_MESSAGE_CONTROL5(ServiceWorkerMsg_MessageToDocument, | 235 IPC_MESSAGE_CONTROL5(ServiceWorkerMsg_MessageToDocument, |
| 229 int /* thread_id */, | 236 int /* thread_id */, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 blink::WebServiceWorkerCacheError /* reason */) | 287 blink::WebServiceWorkerCacheError /* reason */) |
| 281 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageCreateError, | 288 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageCreateError, |
| 282 int /* request_id */, | 289 int /* request_id */, |
| 283 blink::WebServiceWorkerCacheError /* reason */) | 290 blink::WebServiceWorkerCacheError /* reason */) |
| 284 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageDeleteError, | 291 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageDeleteError, |
| 285 int /* request_id */, | 292 int /* request_id */, |
| 286 blink::WebServiceWorkerCacheError /* reason */) | 293 blink::WebServiceWorkerCacheError /* reason */) |
| 287 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysError, | 294 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysError, |
| 288 int /* request_id */, | 295 int /* request_id */, |
| 289 blink::WebServiceWorkerCacheError /* reason */) | 296 blink::WebServiceWorkerCacheError /* reason */) |
| OLD | NEW |