| 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> |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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<content::MessagePort> /* 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, | |
| 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 | |
| 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 | |
| 224 // MSG_ROUTING_NONE. |provider_type| identifies whether this provider is for | |
| 225 // Service Worker controllees (documents and Shared Workers) or for controllers | |
| 226 // (Service Workers). | |
| 227 // | |
| 228 // |is_parent_frame_secure| is false if the provider is created for a | |
| 229 // document whose parent frame is not secure from the point of view of the | |
| 230 // document; that is, blink::WebFrame::canHaveSecureChild() returns false. | |
| 231 // This doesn't mean the document is necessarily an insecure context, | |
| 232 // because the document may have a URL whose scheme is granted an exception | |
| 233 // that allows bypassing the ancestor secure context check. See the | |
| 234 // comment in blink::Document::isSecureContextImpl for more details. | |
| 235 // If the provider is not created for a document, or the document does not have | |
| 236 // a parent frame, |is_parent_frame_secure| is true. | |
| 237 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_ProviderCreated, | |
| 238 int /* provider_id */, | |
| 239 int /* route_id */, | |
| 240 content::ServiceWorkerProviderType /* provider_type */, | |
| 241 bool /* is_parent_frame_secure */) | |
| 242 | |
| 243 // Informs the browser of a ServiceWorkerProvider being destroyed. | |
| 244 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed, | |
| 245 int /* provider_id */) | |
| 246 | |
| 247 // Increments and decrements the ServiceWorker object's reference | 219 // Increments and decrements the ServiceWorker object's reference |
| 248 // counting in the browser side. The ServiceWorker object is created | 220 // counting in the browser side. The ServiceWorker object is created |
| 249 // with ref-count==1 initially. | 221 // with ref-count==1 initially. |
| 250 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_IncrementServiceWorkerRefCount, | 222 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_IncrementServiceWorkerRefCount, |
| 251 int /* handle_id */) | 223 int /* handle_id */) |
| 252 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_DecrementServiceWorkerRefCount, | 224 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_DecrementServiceWorkerRefCount, |
| 253 int /* handle_id */) | 225 int /* handle_id */) |
| 254 | 226 |
| 255 // Increments and decrements the ServiceWorkerRegistration object's reference | 227 // Increments and decrements the ServiceWorkerRegistration object's reference |
| 256 // counting in the browser side. The registration object is created with | 228 // counting in the browser side. The registration object is created with |
| 257 // ref-count==1 initially. | 229 // ref-count==1 initially. |
| 258 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_IncrementRegistrationRefCount, | 230 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_IncrementRegistrationRefCount, |
| 259 int /* registration_handle_id */) | 231 int /* registration_handle_id */) |
| 260 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_DecrementRegistrationRefCount, | 232 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_DecrementRegistrationRefCount, |
| 261 int /* registration_handle_id */) | 233 int /* registration_handle_id */) |
| 262 | 234 |
| 263 // Tells the browser to terminate a service worker. Used in layout tests to | 235 // Tells the browser to terminate a service worker. Used in layout tests to |
| 264 // verify behavior when a service worker isn't running. | 236 // verify behavior when a service worker isn't running. |
| 265 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_TerminateWorker, | 237 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_TerminateWorker, |
| 266 int /* handle_id */) | 238 int /* handle_id */) |
| 267 | 239 |
| 268 // Informs the browser that a service worker is starting up in a provider. | |
| 269 // |provider_id| identifies the ServiceWorkerProviderHost hosting the service | |
| 270 // worker. |version_id| identifies the ServiceWorkerVersion and | |
| 271 // |embedded_worker_id| identifies the EmbeddedWorkerInstance. | |
| 272 IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_SetVersionId, | |
| 273 int /* provider_id */, | |
| 274 int64_t /* version_id */, | |
| 275 int /* embedded_worker_id */) | |
| 276 | |
| 277 // Informs the browser that event handling has finished. | 240 // Informs the browser that event handling has finished. |
| 278 // Routed to the target ServiceWorkerVersion. | 241 // Routed to the target ServiceWorkerVersion. |
| 279 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_InstallEventFinished, | 242 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_InstallEventFinished, |
| 280 int /* request_id */, | 243 int /* request_id */, |
| 281 blink::WebServiceWorkerEventResult, | 244 blink::WebServiceWorkerEventResult, |
| 282 bool /* has_fetch_event_handler */, | 245 bool /* has_fetch_event_handler */, |
| 283 base::Time /* dispatch_event_time */) | 246 base::Time /* dispatch_event_time */) |
| 284 | 247 |
| 285 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_FetchEventResponse, | 248 IPC_MESSAGE_ROUTED4(ServiceWorkerHostMsg_FetchEventResponse, |
| 286 int /* fetch_event_id */, | 249 int /* fetch_event_id */, |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 | 520 |
| 558 // Sent via EmbeddedWorker as a response of NavigateClient. | 521 // Sent via EmbeddedWorker as a response of NavigateClient. |
| 559 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientResponse, | 522 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientResponse, |
| 560 int /* request_id */, | 523 int /* request_id */, |
| 561 content::ServiceWorkerClientInfo /* client */) | 524 content::ServiceWorkerClientInfo /* client */) |
| 562 | 525 |
| 563 // Sent via EmbeddedWorker as an error response of NavigateClient. | 526 // Sent via EmbeddedWorker as an error response of NavigateClient. |
| 564 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientError, | 527 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientError, |
| 565 int /* request_id */, | 528 int /* request_id */, |
| 566 GURL /* url */) | 529 GURL /* url */) |
| OLD | NEW |