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