| 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 "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
| 8 #include "content/common/service_worker/service_worker_status_code.h" | 8 #include "content/common/service_worker/service_worker_status_code.h" |
| 9 #include "content/common/service_worker/service_worker_types.h" | 9 #include "content/common/service_worker/service_worker_types.h" |
| 10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 int32 /* thread_id */, | 39 int32 /* thread_id */, |
| 40 int32 /* request_id */, | 40 int32 /* request_id */, |
| 41 GURL /* scope */, | 41 GURL /* scope */, |
| 42 GURL /* script_url */) | 42 GURL /* script_url */) |
| 43 | 43 |
| 44 IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_UnregisterServiceWorker, | 44 IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_UnregisterServiceWorker, |
| 45 int32 /* thread_id */, | 45 int32 /* thread_id */, |
| 46 int32 /* request_id */, | 46 int32 /* request_id */, |
| 47 GURL /* scope (url pattern) */) | 47 GURL /* scope (url pattern) */) |
| 48 | 48 |
| 49 // Sends a 'message' event to a service worker (renderer->browser). |
| 50 IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_PostMessage, |
| 51 int64 /* registration_id */, |
| 52 base::string16 /* message */, |
| 53 std::vector<int> /* sent_message_port_ids */) |
| 54 |
| 49 // Messages sent from the browser to the child process. | 55 // Messages sent from the browser to the child process. |
| 50 | 56 |
| 51 // Response to ServiceWorkerMsg_RegisterServiceWorker | 57 // Response to ServiceWorkerMsg_RegisterServiceWorker |
| 52 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered, | 58 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered, |
| 53 int32 /* thread_id */, | 59 int32 /* thread_id */, |
| 54 int32 /* request_id */, | 60 int32 /* request_id */, |
| 55 int64 /* service_worker_id */) | 61 int64 /* service_worker_id */) |
| 56 | 62 |
| 57 // Response to ServiceWorkerMsg_UnregisterServiceWorker | 63 // Response to ServiceWorkerMsg_UnregisterServiceWorker |
| 58 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered, | 64 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered, |
| 59 int32 /* thread_id */, | 65 int32 /* thread_id */, |
| 60 int32 /* request_id */) | 66 int32 /* request_id */) |
| 61 | 67 |
| 62 // Sent when any kind of registration error occurs during a | 68 // Sent when any kind of registration error occurs during a |
| 63 // RegisterServiceWorker / UnregisterServiceWorker handler above. | 69 // RegisterServiceWorker / UnregisterServiceWorker handler above. |
| 64 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError, | 70 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError, |
| 65 int32 /* thread_id */, | 71 int32 /* thread_id */, |
| 66 int32 /* request_id */, | 72 int32 /* request_id */, |
| 67 blink::WebServiceWorkerError::ErrorType /* code */, | 73 blink::WebServiceWorkerError::ErrorType /* code */, |
| 68 base::string16 /* message */) | 74 base::string16 /* message */) |
| 69 | 75 |
| 70 // Sent via EmbeddedWorker to dispatch install event. | 76 // Sent via EmbeddedWorker to dispatch install event. |
| 71 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_InstallEvent, | 77 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_InstallEvent, |
| 72 int /* active_version_embedded_worker_id */) | 78 int /* active_version_embedded_worker_id */) |
| 73 | 79 |
| 74 // Sent via EmbeddedWorker to dispatch fetch event. | 80 // Sent via EmbeddedWorker to dispatch fetch event. |
| 75 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_FetchEvent, | 81 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_FetchEvent, |
| 76 content::ServiceWorkerFetchRequest) | 82 content::ServiceWorkerFetchRequest) |
| 77 | 83 |
| 84 // Sends a 'message' event to a service worker (browser->EmbeddedWorker). |
| 85 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_Message, |
| 86 base::string16 /* message */, |
| 87 std::vector<int> /* sent_message_port_ids */, |
| 88 std::vector<int> /* new_routing_ids */) |
| 89 |
| 78 // Informs the browser of a new ServiceWorkerProvider in the child process, | 90 // Informs the browser of a new ServiceWorkerProvider in the child process, |
| 79 // |provider_id| is unique within its child process. | 91 // |provider_id| is unique within its child process. |
| 80 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated, | 92 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated, |
| 81 int /* provider_id */) | 93 int /* provider_id */) |
| 82 | 94 |
| 83 // Informs the browser of a ServiceWorkerProvider being destroyed. | 95 // Informs the browser of a ServiceWorkerProvider being destroyed. |
| 84 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed, | 96 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed, |
| 85 int /* provider_id */) | 97 int /* provider_id */) |
| 86 | 98 |
| 87 // Informs the browser of a new scriptable API client in the child process. | 99 // Informs the browser of a new scriptable API client in the child process. |
| 88 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_AddScriptClient, | 100 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_AddScriptClient, |
| 89 int /* thread_id */, | 101 int /* thread_id */, |
| 90 int /* provider_id */) | 102 int /* provider_id */) |
| 91 | 103 |
| 92 // Informs the browser that the scriptable API client is unregistered. | 104 // Informs the browser that the scriptable API client is unregistered. |
| 93 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_RemoveScriptClient, | 105 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_RemoveScriptClient, |
| 94 int /* thread_id */, | 106 int /* thread_id */, |
| 95 int /* provider_id */) | 107 int /* provider_id */) |
| 96 | 108 |
| 97 // Informs the browser that install event handling has finished. | 109 // Informs the browser that install event handling has finished. |
| 98 // Sent via EmbeddedWorker. If there was an exception during the | 110 // Sent via EmbeddedWorker. If there was an exception during the |
| 99 // event handling it'll be reported back separately (to be propagated | 111 // event handling it'll be reported back separately (to be propagated |
| 100 // to the documents). | 112 // to the documents). |
| 101 IPC_MESSAGE_CONTROL0(ServiceWorkerHostMsg_InstallEventFinished) | 113 IPC_MESSAGE_CONTROL0(ServiceWorkerHostMsg_InstallEventFinished) |
| 102 | 114 |
| 103 // Informs the browser that fetch event handling has finished. | 115 // Informs the browser that fetch event handling has finished. |
| 104 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_FetchEventFinished, | 116 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_FetchEventFinished, |
| 105 content::ServiceWorkerFetchResponse) | 117 content::ServiceWorkerFetchResponse) |
| OLD | NEW |