| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "content/common/message_port.h" |
| 14 #include "content/common/service_worker/service_worker_client_info.h" | 15 #include "content/common/service_worker/service_worker_client_info.h" |
| 15 #include "content/common/service_worker/service_worker_status_code.h" | 16 #include "content/common/service_worker/service_worker_status_code.h" |
| 16 #include "content/common/service_worker/service_worker_types.h" | 17 #include "content/common/service_worker/service_worker_types.h" |
| 17 #include "content/public/common/platform_notification_data.h" | 18 #include "content/public/common/platform_notification_data.h" |
| 18 #include "content/public/common/push_event_payload.h" | 19 #include "content/public/common/push_event_payload.h" |
| 19 #include "ipc/ipc_message_macros.h" | 20 #include "ipc/ipc_message_macros.h" |
| 20 #include "ipc/ipc_param_traits.h" | 21 #include "ipc/ipc_param_traits.h" |
| 21 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerError.h" | 22 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerError.h" |
| 22 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerEventResult.h" | 23 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerEventResult.h" |
| 23 #include "url/gurl.h" | 24 #include "url/gurl.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerClientQueryOptions) | 131 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerClientQueryOptions) |
| 131 IPC_STRUCT_TRAITS_MEMBER(client_type) | 132 IPC_STRUCT_TRAITS_MEMBER(client_type) |
| 132 IPC_STRUCT_TRAITS_MEMBER(include_uncontrolled) | 133 IPC_STRUCT_TRAITS_MEMBER(include_uncontrolled) |
| 133 IPC_STRUCT_TRAITS_END() | 134 IPC_STRUCT_TRAITS_END() |
| 134 | 135 |
| 135 IPC_STRUCT_BEGIN(ServiceWorkerMsg_MessageToDocument_Params) | 136 IPC_STRUCT_BEGIN(ServiceWorkerMsg_MessageToDocument_Params) |
| 136 IPC_STRUCT_MEMBER(int, thread_id) | 137 IPC_STRUCT_MEMBER(int, thread_id) |
| 137 IPC_STRUCT_MEMBER(int, provider_id) | 138 IPC_STRUCT_MEMBER(int, provider_id) |
| 138 IPC_STRUCT_MEMBER(content::ServiceWorkerObjectInfo, service_worker_info) | 139 IPC_STRUCT_MEMBER(content::ServiceWorkerObjectInfo, service_worker_info) |
| 139 IPC_STRUCT_MEMBER(base::string16, message) | 140 IPC_STRUCT_MEMBER(base::string16, message) |
| 140 IPC_STRUCT_MEMBER(std::vector<int>, message_ports) | 141 IPC_STRUCT_MEMBER(std::vector<content::MessagePort>, message_ports) |
| 141 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids) | |
| 142 IPC_STRUCT_END() | 142 IPC_STRUCT_END() |
| 143 | 143 |
| 144 IPC_STRUCT_TRAITS_BEGIN(content::PushEventPayload) | 144 IPC_STRUCT_TRAITS_BEGIN(content::PushEventPayload) |
| 145 IPC_STRUCT_TRAITS_MEMBER(data) | 145 IPC_STRUCT_TRAITS_MEMBER(data) |
| 146 IPC_STRUCT_TRAITS_MEMBER(is_null) | 146 IPC_STRUCT_TRAITS_MEMBER(is_null) |
| 147 IPC_STRUCT_TRAITS_END() | 147 IPC_STRUCT_TRAITS_END() |
| 148 | 148 |
| 149 //--------------------------------------------------------------------------- | 149 //--------------------------------------------------------------------------- |
| 150 // Messages sent from the child process to the browser. | 150 // Messages sent from the child process to the browser. |
| 151 | 151 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 int64_t /* registration_id */, | 207 int64_t /* registration_id */, |
| 208 std::string /* header_value */) | 208 std::string /* header_value */) |
| 209 | 209 |
| 210 // Sends ExtendableMessageEvent to a service worker (renderer->browser). | 210 // Sends ExtendableMessageEvent to a service worker (renderer->browser). |
| 211 IPC_MESSAGE_CONTROL5( | 211 IPC_MESSAGE_CONTROL5( |
| 212 ServiceWorkerHostMsg_PostMessageToWorker, | 212 ServiceWorkerHostMsg_PostMessageToWorker, |
| 213 int /* handle_id */, | 213 int /* handle_id */, |
| 214 int /* provider_id */, | 214 int /* provider_id */, |
| 215 base::string16 /* message */, | 215 base::string16 /* message */, |
| 216 url::Origin /* source_origin */, | 216 url::Origin /* source_origin */, |
| 217 std::vector<int> /* sent_message_ports */) | 217 std::vector<content::MessagePort> /* sent_message_ports */) |
| 218 | 218 |
| 219 // Informs the browser of a new ServiceWorkerProvider in the child process, | 219 // Informs the browser of a new ServiceWorkerProvider in the child process, |
| 220 // |provider_id| is unique within its child process. When this provider is | 220 // |provider_id| is unique within its child process. When this provider is |
| 221 // created for a document, |route_id| is the frame ID of it. When this provider | 221 // created for a document, |route_id| is the frame ID of it. When this provider |
| 222 // is created for a Shared Worker, |route_id| is the Shared Worker route ID. | 222 // is created for a Shared Worker, |route_id| is the Shared Worker route ID. |
| 223 // When this provider is created for a Service Worker, |route_id| is | 223 // When this provider is created for a Service Worker, |route_id| is |
| 224 // MSG_ROUTING_NONE. |provider_type| identifies whether this provider is for | 224 // MSG_ROUTING_NONE. |provider_type| identifies whether this provider is for |
| 225 // Service Worker controllees (documents and Shared Workers) or for controllers | 225 // Service Worker controllees (documents and Shared Workers) or for controllers |
| 226 // (Service Workers). | 226 // (Service Workers). |
| 227 // | 227 // |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 // Asks the browser to retrieve clients of the sender ServiceWorker. | 312 // Asks the browser to retrieve clients of the sender ServiceWorker. |
| 313 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_GetClients, | 313 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_GetClients, |
| 314 int /* request_id */, | 314 int /* request_id */, |
| 315 content::ServiceWorkerClientQueryOptions) | 315 content::ServiceWorkerClientQueryOptions) |
| 316 | 316 |
| 317 // Sends MessageEvent to a client (renderer->browser). | 317 // Sends MessageEvent to a client (renderer->browser). |
| 318 IPC_MESSAGE_ROUTED3( | 318 IPC_MESSAGE_ROUTED3( |
| 319 ServiceWorkerHostMsg_PostMessageToClient, | 319 ServiceWorkerHostMsg_PostMessageToClient, |
| 320 std::string /* uuid */, | 320 std::string /* uuid */, |
| 321 base::string16 /* message */, | 321 base::string16 /* message */, |
| 322 std::vector<int> /* sent_message_ports */) | 322 std::vector<content::MessagePort> /* sent_message_ports */) |
| 323 | 323 |
| 324 // ServiceWorker -> Browser message to request that the ServiceWorkerStorage | 324 // ServiceWorker -> Browser message to request that the ServiceWorkerStorage |
| 325 // cache |data| associated with |url|. | 325 // cache |data| associated with |url|. |
| 326 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_SetCachedMetadata, | 326 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_SetCachedMetadata, |
| 327 GURL /* url */, | 327 GURL /* url */, |
| 328 std::vector<char> /* data */) | 328 std::vector<char> /* data */) |
| 329 | 329 |
| 330 // ServiceWorker -> Browser message to request that the ServiceWorkerStorage | 330 // ServiceWorker -> Browser message to request that the ServiceWorkerStorage |
| 331 // clear the cache associated with |url|. | 331 // clear the cache associated with |url|. |
| 332 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_ClearCachedMetadata, GURL /* url */) | 332 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_ClearCachedMetadata, GURL /* url */) |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 | 572 |
| 573 // Sent via EmbeddedWorker as a response of NavigateClient. | 573 // Sent via EmbeddedWorker as a response of NavigateClient. |
| 574 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientResponse, | 574 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientResponse, |
| 575 int /* request_id */, | 575 int /* request_id */, |
| 576 content::ServiceWorkerClientInfo /* client */) | 576 content::ServiceWorkerClientInfo /* client */) |
| 577 | 577 |
| 578 // Sent via EmbeddedWorker as an error response of NavigateClient. | 578 // Sent via EmbeddedWorker as an error response of NavigateClient. |
| 579 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientError, | 579 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientError, |
| 580 int /* request_id */, | 580 int /* request_id */, |
| 581 GURL /* url */) | 581 GURL /* url */) |
| OLD | NEW |