| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 int32 /* thread_id */, | 48 int32 /* thread_id */, |
| 49 int32 /* request_id */, | 49 int32 /* request_id */, |
| 50 GURL /* scope (url pattern) */) | 50 GURL /* scope (url pattern) */) |
| 51 | 51 |
| 52 // Sends a 'message' event to a service worker (renderer->browser). | 52 // Sends a 'message' event to a service worker (renderer->browser). |
| 53 IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_PostMessage, | 53 IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_PostMessage, |
| 54 int64 /* registration_id */, | 54 int64 /* registration_id */, |
| 55 base::string16 /* message */, | 55 base::string16 /* message */, |
| 56 std::vector<int> /* sent_message_port_ids */) | 56 std::vector<int> /* sent_message_port_ids */) |
| 57 | 57 |
| 58 // Informs the browser of a new ServiceWorkerProvider in the child process, |
| 59 // |provider_id| is unique within its child process. |
| 60 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated, |
| 61 int /* provider_id */) |
| 62 |
| 63 // Informs the browser of a ServiceWorkerProvider being destroyed. |
| 64 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed, |
| 65 int /* provider_id */) |
| 66 |
| 67 // Informs the browser that |provider_id| is associated |
| 68 // with a service worker script running context and |
| 69 // |version_id| identifies which ServcieWorkerVersion. |
| 70 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_SetVersionId, |
| 71 int /* provider_id */, |
| 72 int64 /* version_id */) |
| 73 |
| 74 // Informs the browser of a new scriptable API client in the child process. |
| 75 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_AddScriptClient, |
| 76 int /* thread_id */, |
| 77 int /* provider_id */) |
| 78 |
| 79 // Informs the browser that the scriptable API client is unregistered. |
| 80 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_RemoveScriptClient, |
| 81 int /* thread_id */, |
| 82 int /* provider_id */) |
| 83 |
| 84 // Informs the browser that install event handling has finished. |
| 85 // Sent via EmbeddedWorker. If there was an exception during the |
| 86 // event handling it'll be reported back separately (to be propagated |
| 87 // to the documents). |
| 88 IPC_MESSAGE_CONTROL0(ServiceWorkerHostMsg_InstallEventFinished) |
| 89 |
| 90 // Informs the browser that fetch event handling has finished. |
| 91 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_FetchEventFinished, |
| 92 content::ServiceWorkerFetchEventResult, |
| 93 content::ServiceWorkerResponse) |
| 94 |
| 58 // Messages sent from the browser to the child process. | 95 // Messages sent from the browser to the child process. |
| 59 | 96 |
| 60 // Response to ServiceWorkerMsg_RegisterServiceWorker | 97 // Response to ServiceWorkerMsg_RegisterServiceWorker |
| 61 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered, | 98 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered, |
| 62 int32 /* thread_id */, | 99 int32 /* thread_id */, |
| 63 int32 /* request_id */, | 100 int32 /* request_id */, |
| 64 int64 /* service_worker_id */) | 101 int64 /* service_worker_id */) |
| 65 | 102 |
| 66 // Response to ServiceWorkerMsg_UnregisterServiceWorker | 103 // Response to ServiceWorkerMsg_UnregisterServiceWorker |
| 67 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered, | 104 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 83 // Sent via EmbeddedWorker to dispatch fetch event. | 120 // Sent via EmbeddedWorker to dispatch fetch event. |
| 84 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_FetchEvent, | 121 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_FetchEvent, |
| 85 content::ServiceWorkerFetchRequest) | 122 content::ServiceWorkerFetchRequest) |
| 86 | 123 |
| 87 // Sends a 'message' event to a service worker (browser->EmbeddedWorker). | 124 // Sends a 'message' event to a service worker (browser->EmbeddedWorker). |
| 88 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_Message, | 125 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_Message, |
| 89 base::string16 /* message */, | 126 base::string16 /* message */, |
| 90 std::vector<int> /* sent_message_port_ids */, | 127 std::vector<int> /* sent_message_port_ids */, |
| 91 std::vector<int> /* new_routing_ids */) | 128 std::vector<int> /* new_routing_ids */) |
| 92 | 129 |
| 93 // Informs the browser of a new ServiceWorkerProvider in the child process, | |
| 94 // |provider_id| is unique within its child process. | |
| 95 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated, | |
| 96 int /* provider_id */) | |
| 97 | |
| 98 // Informs the browser of a ServiceWorkerProvider being destroyed. | |
| 99 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed, | |
| 100 int /* provider_id */) | |
| 101 | |
| 102 // Informs the browser of a new scriptable API client in the child process. | |
| 103 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_AddScriptClient, | |
| 104 int /* thread_id */, | |
| 105 int /* provider_id */) | |
| 106 | |
| 107 // Informs the browser that the scriptable API client is unregistered. | |
| 108 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_RemoveScriptClient, | |
| 109 int /* thread_id */, | |
| 110 int /* provider_id */) | |
| 111 | |
| 112 // Informs the browser that install event handling has finished. | |
| 113 // Sent via EmbeddedWorker. If there was an exception during the | |
| 114 // event handling it'll be reported back separately (to be propagated | |
| 115 // to the documents). | |
| 116 IPC_MESSAGE_CONTROL0(ServiceWorkerHostMsg_InstallEventFinished) | |
| 117 | |
| 118 // Informs the browser that fetch event handling has finished. | |
| 119 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_FetchEventFinished, | |
| 120 content::ServiceWorkerFetchEventResult, | |
| 121 content::ServiceWorkerResponse) | |
| OLD | NEW |