| 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" |
| 11 #include "content/common/service_worker/service_worker_client_info.h" | 11 #include "content/common/service_worker/service_worker_client_info.h" |
| 12 #include "content/common/service_worker/service_worker_status_code.h" | 12 #include "content/common/service_worker/service_worker_status_code.h" |
| 13 #include "content/common/service_worker/service_worker_types.h" | 13 #include "content/common/service_worker/service_worker_types.h" |
| 14 #include "content/public/common/message_port_types.h" | 14 #include "content/public/common/message_port_types.h" |
| 15 #include "content/public/common/navigator_connect_client.h" | 15 #include "content/public/common/navigator_connect_client.h" |
| 16 #include "content/public/common/platform_notification_data.h" | 16 #include "content/public/common/platform_notification_data.h" |
| 17 #include "ipc/ipc_message_macros.h" | 17 #include "ipc/ipc_message_macros.h" |
| 18 #include "ipc/ipc_param_traits.h" | 18 #include "ipc/ipc_param_traits.h" |
| 19 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h" | 19 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h" |
| 20 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" | 20 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" |
| 21 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h" | |
| 22 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" | 21 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" |
| 23 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" | 22 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" |
| 24 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 25 | 24 |
| 26 #undef IPC_MESSAGE_EXPORT | 25 #undef IPC_MESSAGE_EXPORT |
| 27 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 26 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 28 | 27 |
| 29 #define IPC_MESSAGE_START ServiceWorkerMsgStart | 28 #define IPC_MESSAGE_START ServiceWorkerMsgStart |
| 30 | 29 |
| 31 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerError::ErrorType, | 30 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerError::ErrorType, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 IPC_STRUCT_TRAITS_MEMBER(url) | 66 IPC_STRUCT_TRAITS_MEMBER(url) |
| 68 IPC_STRUCT_TRAITS_MEMBER(status_code) | 67 IPC_STRUCT_TRAITS_MEMBER(status_code) |
| 69 IPC_STRUCT_TRAITS_MEMBER(status_text) | 68 IPC_STRUCT_TRAITS_MEMBER(status_text) |
| 70 IPC_STRUCT_TRAITS_MEMBER(response_type) | 69 IPC_STRUCT_TRAITS_MEMBER(response_type) |
| 71 IPC_STRUCT_TRAITS_MEMBER(headers) | 70 IPC_STRUCT_TRAITS_MEMBER(headers) |
| 72 IPC_STRUCT_TRAITS_MEMBER(blob_uuid) | 71 IPC_STRUCT_TRAITS_MEMBER(blob_uuid) |
| 73 IPC_STRUCT_TRAITS_MEMBER(blob_size) | 72 IPC_STRUCT_TRAITS_MEMBER(blob_size) |
| 74 IPC_STRUCT_TRAITS_MEMBER(stream_url) | 73 IPC_STRUCT_TRAITS_MEMBER(stream_url) |
| 75 IPC_STRUCT_TRAITS_END() | 74 IPC_STRUCT_TRAITS_END() |
| 76 | 75 |
| 77 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerCacheQueryParams) | |
| 78 IPC_STRUCT_TRAITS_MEMBER(ignore_search) | |
| 79 IPC_STRUCT_TRAITS_MEMBER(ignore_method) | |
| 80 IPC_STRUCT_TRAITS_MEMBER(ignore_vary) | |
| 81 IPC_STRUCT_TRAITS_MEMBER(cache_name) | |
| 82 IPC_STRUCT_TRAITS_END() | |
| 83 | |
| 84 IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerCacheOperationType, | |
| 85 content::SERVICE_WORKER_CACHE_OPERATION_TYPE_LAST) | |
| 86 | |
| 87 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerBatchOperation) | |
| 88 IPC_STRUCT_TRAITS_MEMBER(operation_type) | |
| 89 IPC_STRUCT_TRAITS_MEMBER(request) | |
| 90 IPC_STRUCT_TRAITS_MEMBER(response) | |
| 91 IPC_STRUCT_TRAITS_MEMBER(match_params) | |
| 92 IPC_STRUCT_TRAITS_END() | |
| 93 | |
| 94 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerObjectInfo) | 76 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerObjectInfo) |
| 95 IPC_STRUCT_TRAITS_MEMBER(handle_id) | 77 IPC_STRUCT_TRAITS_MEMBER(handle_id) |
| 96 IPC_STRUCT_TRAITS_MEMBER(url) | 78 IPC_STRUCT_TRAITS_MEMBER(url) |
| 97 IPC_STRUCT_TRAITS_MEMBER(state) | 79 IPC_STRUCT_TRAITS_MEMBER(state) |
| 98 IPC_STRUCT_TRAITS_MEMBER(version_id) | 80 IPC_STRUCT_TRAITS_MEMBER(version_id) |
| 99 IPC_STRUCT_TRAITS_END() | 81 IPC_STRUCT_TRAITS_END() |
| 100 | 82 |
| 101 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerRegistrationObjectInfo) | 83 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerRegistrationObjectInfo) |
| 102 IPC_STRUCT_TRAITS_MEMBER(handle_id) | 84 IPC_STRUCT_TRAITS_MEMBER(handle_id) |
| 103 IPC_STRUCT_TRAITS_MEMBER(scope) | 85 IPC_STRUCT_TRAITS_MEMBER(scope) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 117 IPC_STRUCT_TRAITS_MEMBER(url) | 99 IPC_STRUCT_TRAITS_MEMBER(url) |
| 118 IPC_STRUCT_TRAITS_MEMBER(frame_type) | 100 IPC_STRUCT_TRAITS_MEMBER(frame_type) |
| 119 IPC_STRUCT_TRAITS_MEMBER(client_type) | 101 IPC_STRUCT_TRAITS_MEMBER(client_type) |
| 120 IPC_STRUCT_TRAITS_END() | 102 IPC_STRUCT_TRAITS_END() |
| 121 | 103 |
| 122 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerClientQueryOptions) | 104 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerClientQueryOptions) |
| 123 IPC_STRUCT_TRAITS_MEMBER(client_type) | 105 IPC_STRUCT_TRAITS_MEMBER(client_type) |
| 124 IPC_STRUCT_TRAITS_MEMBER(include_uncontrolled) | 106 IPC_STRUCT_TRAITS_MEMBER(include_uncontrolled) |
| 125 IPC_STRUCT_TRAITS_END() | 107 IPC_STRUCT_TRAITS_END() |
| 126 | 108 |
| 127 IPC_ENUM_TRAITS_MAX_VALUE( | |
| 128 blink::WebServiceWorkerCacheError, | |
| 129 blink::WebServiceWorkerCacheErrorLast) | |
| 130 | |
| 131 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebGeofencingEventType, | 109 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebGeofencingEventType, |
| 132 blink::WebGeofencingEventTypeLast) | 110 blink::WebGeofencingEventTypeLast) |
| 133 | 111 |
| 134 //--------------------------------------------------------------------------- | 112 //--------------------------------------------------------------------------- |
| 135 // Messages sent from the child process to the browser. | 113 // Messages sent from the child process to the browser. |
| 136 | 114 |
| 137 IPC_MESSAGE_CONTROL5(ServiceWorkerHostMsg_RegisterServiceWorker, | 115 IPC_MESSAGE_CONTROL5(ServiceWorkerHostMsg_RegisterServiceWorker, |
| 138 int /* thread_id */, | 116 int /* thread_id */, |
| 139 int /* request_id */, | 117 int /* request_id */, |
| 140 int /* provider_id */, | 118 int /* provider_id */, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 250 |
| 273 // Asks the browser to force this worker to become activated. | 251 // Asks the browser to force this worker to become activated. |
| 274 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_SkipWaiting, | 252 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_SkipWaiting, |
| 275 int /* request_id */) | 253 int /* request_id */) |
| 276 | 254 |
| 277 // Asks the browser to have this worker take control of pages that match | 255 // Asks the browser to have this worker take control of pages that match |
| 278 // its scope. | 256 // its scope. |
| 279 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_ClaimClients, | 257 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_ClaimClients, |
| 280 int /* request_id */) | 258 int /* request_id */) |
| 281 | 259 |
| 282 // CacheStorage operations in the browser. | |
| 283 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageHas, | |
| 284 int /* request_id */, | |
| 285 base::string16 /* fetch_store_name */) | |
| 286 | |
| 287 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageOpen, | |
| 288 int /* request_id */, | |
| 289 base::string16 /* fetch_store_name */) | |
| 290 | |
| 291 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageDelete, | |
| 292 int /* request_id */, | |
| 293 base::string16 /* fetch_store_name */) | |
| 294 | |
| 295 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheStorageKeys, | |
| 296 int /* request_id */) | |
| 297 | |
| 298 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_CacheStorageMatch, | |
| 299 int /* request_id */, | |
| 300 content::ServiceWorkerFetchRequest, | |
| 301 content::ServiceWorkerCacheQueryParams) | |
| 302 | |
| 303 // Cache operations in the browser. | |
| 304 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheMatch, | |
| 305 int /* request_id */, | |
| 306 int /* cache_id */, | |
| 307 content::ServiceWorkerFetchRequest, | |
| 308 content::ServiceWorkerCacheQueryParams) | |
| 309 | |
| 310 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheMatchAll, | |
| 311 int /* request_id */, | |
| 312 int /* cache_id */, | |
| 313 content::ServiceWorkerFetchRequest, | |
| 314 content::ServiceWorkerCacheQueryParams) | |
| 315 | |
| 316 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_CacheKeys, | |
| 317 int /* request_id */, | |
| 318 int /* cache_id */, | |
| 319 content::ServiceWorkerFetchRequest, | |
| 320 content::ServiceWorkerCacheQueryParams) | |
| 321 | |
| 322 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_CacheBatch, | |
| 323 int /* request_id */, | |
| 324 int /* cache_id */, | |
| 325 std::vector<content::ServiceWorkerBatchOperation>) | |
| 326 | |
| 327 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_CacheClosed, | |
| 328 int /* cache_id */) | |
| 329 | |
| 330 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_BlobDataHandled, | |
| 331 std::string /* uuid */) | |
| 332 | |
| 333 //--------------------------------------------------------------------------- | 260 //--------------------------------------------------------------------------- |
| 334 // Messages sent from the browser to the child process. | 261 // Messages sent from the browser to the child process. |
| 335 // | 262 // |
| 336 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have | 263 // NOTE: All ServiceWorkerMsg messages not sent via EmbeddedWorker must have |
| 337 // a thread_id as their first field so that ServiceWorkerMessageFilter can | 264 // a thread_id as their first field so that ServiceWorkerMessageFilter can |
| 338 // extract it and dispatch the message to the correct ServiceWorkerDispatcher | 265 // extract it and dispatch the message to the correct ServiceWorkerDispatcher |
| 339 // on the correct thread. | 266 // on the correct thread. |
| 340 | 267 |
| 341 // Informs the child process of the registration associated with the service | 268 // Informs the child process of the registration associated with the service |
| 342 // worker. | 269 // worker. |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 432 |
| 506 // Sent via EmbeddedWorker as an error response of OpenWindow. | 433 // Sent via EmbeddedWorker as an error response of OpenWindow. |
| 507 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_OpenWindowError, | 434 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_OpenWindowError, |
| 508 int /* request_id */, | 435 int /* request_id */, |
| 509 std::string /* message */ ) | 436 std::string /* message */ ) |
| 510 | 437 |
| 511 // Sent via EmbeddedWorker as a response of FocusClient. | 438 // Sent via EmbeddedWorker as a response of FocusClient. |
| 512 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_FocusClientResponse, | 439 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_FocusClientResponse, |
| 513 int /* request_id */, | 440 int /* request_id */, |
| 514 content::ServiceWorkerClientInfo /* client */) | 441 content::ServiceWorkerClientInfo /* client */) |
| 515 | |
| 516 // Sent via EmbeddedWorker at successful completion of CacheStorage operations. | |
| 517 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_CacheStorageHasSuccess, | |
| 518 int /* request_id */) | |
| 519 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageOpenSuccess, | |
| 520 int /* request_id */, | |
| 521 int /* fetch_store_id */) | |
| 522 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_CacheStorageDeleteSuccess, | |
| 523 int /* request_id */) | |
| 524 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysSuccess, | |
| 525 int /* request_id */, | |
| 526 std::vector<base::string16> /* keys */) | |
| 527 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageMatchSuccess, | |
| 528 int /* request_id */, | |
| 529 content::ServiceWorkerResponse) | |
| 530 | |
| 531 // Sent via EmbeddedWorker at erroneous completion of CacheStorage operations. | |
| 532 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageHasError, | |
| 533 int /* request_id */, | |
| 534 blink::WebServiceWorkerCacheError /* reason */) | |
| 535 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageOpenError, | |
| 536 int /* request_id */, | |
| 537 blink::WebServiceWorkerCacheError /* reason */) | |
| 538 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageDeleteError, | |
| 539 int /* request_id */, | |
| 540 blink::WebServiceWorkerCacheError /* reason */) | |
| 541 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageKeysError, | |
| 542 int /* request_id */, | |
| 543 blink::WebServiceWorkerCacheError /* reason */) | |
| 544 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheStorageMatchError, | |
| 545 int /* request_id */, | |
| 546 blink::WebServiceWorkerCacheError) | |
| 547 | |
| 548 // Sent via EmbeddedWorker at successful completion of Cache operations. | |
| 549 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchSuccess, | |
| 550 int /* request_id */, | |
| 551 content::ServiceWorkerResponse) | |
| 552 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllSuccess, | |
| 553 int /* request_id */, | |
| 554 std::vector<content::ServiceWorkerResponse>) | |
| 555 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysSuccess, | |
| 556 int /* request_id */, | |
| 557 std::vector<content::ServiceWorkerFetchRequest>) | |
| 558 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchSuccess, | |
| 559 int /* request_id */, | |
| 560 std::vector<content::ServiceWorkerResponse>) | |
| 561 | |
| 562 // Sent via EmbeddedWorker at erroneous completion of CacheStorage operations. | |
| 563 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchError, | |
| 564 int /* request_id */, | |
| 565 blink::WebServiceWorkerCacheError) | |
| 566 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllError, | |
| 567 int /* request_id */, | |
| 568 blink::WebServiceWorkerCacheError) | |
| 569 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysError, | |
| 570 int /* request_id */, | |
| 571 blink::WebServiceWorkerCacheError) | |
| 572 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchError, | |
| 573 int /* request_id */, | |
| 574 blink::WebServiceWorkerCacheError) | |
| OLD | NEW |