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" |
11 #include "ipc/ipc_param_traits.h" | 11 #include "ipc/ipc_param_traits.h" |
12 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" | 12 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" |
13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
14 | 14 |
15 #undef IPC_MESSAGE_EXPORT | 15 #undef IPC_MESSAGE_EXPORT |
16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
17 | 17 |
18 #define IPC_MESSAGE_START ServiceWorkerMsgStart | 18 #define IPC_MESSAGE_START ServiceWorkerMsgStart |
19 | 19 |
20 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerError::ErrorType, | 20 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerError::ErrorType, |
21 blink::WebServiceWorkerError::ErrorTypeLast) | 21 blink::WebServiceWorkerError::ErrorTypeLast) |
22 | 22 |
23 IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerInstallEventResult, | |
24 content::SERVICE_WORKER_INSTALL_EVENT_RESULT_LAST) | |
25 | |
23 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchRequest) | 26 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchRequest) |
24 IPC_STRUCT_TRAITS_MEMBER(url) | 27 IPC_STRUCT_TRAITS_MEMBER(url) |
25 IPC_STRUCT_TRAITS_MEMBER(method) | 28 IPC_STRUCT_TRAITS_MEMBER(method) |
26 IPC_STRUCT_TRAITS_MEMBER(headers) | 29 IPC_STRUCT_TRAITS_MEMBER(headers) |
27 IPC_STRUCT_TRAITS_END() | 30 IPC_STRUCT_TRAITS_END() |
28 | 31 |
29 IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerFetchEventResult, | 32 IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerFetchEventResult, |
30 content::SERVICE_WORKER_FETCH_EVENT_LAST) | 33 content::SERVICE_WORKER_FETCH_EVENT_LAST) |
31 | 34 |
32 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerResponse) | 35 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerResponse) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 // Sent when any kind of registration error occurs during a | 74 // Sent when any kind of registration error occurs during a |
72 // RegisterServiceWorker / UnregisterServiceWorker handler above. | 75 // RegisterServiceWorker / UnregisterServiceWorker handler above. |
73 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError, | 76 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError, |
74 int32 /* thread_id */, | 77 int32 /* thread_id */, |
75 int32 /* request_id */, | 78 int32 /* request_id */, |
76 blink::WebServiceWorkerError::ErrorType /* code */, | 79 blink::WebServiceWorkerError::ErrorType /* code */, |
77 base::string16 /* message */) | 80 base::string16 /* message */) |
78 | 81 |
79 // Sent via EmbeddedWorker to dispatch install event. | 82 // Sent via EmbeddedWorker to dispatch install event. |
80 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_InstallEvent, | 83 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_InstallEvent, |
81 int /* active_version_embedded_worker_id */) | 84 int /* active_version_embedded_worker_id */) |
kinuko
2014/03/25 11:18:42
While you're there can we also rename this to acti
falken
2014/03/26 07:53:56
Done.
| |
82 | 85 |
83 // Sent via EmbeddedWorker to dispatch fetch event. | 86 // Sent via EmbeddedWorker to dispatch fetch event. |
84 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_FetchEvent, | 87 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_FetchEvent, |
85 content::ServiceWorkerFetchRequest) | 88 content::ServiceWorkerFetchRequest) |
86 | 89 |
87 // Sends a 'message' event to a service worker (browser->EmbeddedWorker). | 90 // Sends a 'message' event to a service worker (browser->EmbeddedWorker). |
88 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_Message, | 91 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_Message, |
89 base::string16 /* message */, | 92 base::string16 /* message */, |
90 std::vector<int> /* sent_message_port_ids */, | 93 std::vector<int> /* sent_message_port_ids */, |
91 std::vector<int> /* new_routing_ids */) | 94 std::vector<int> /* new_routing_ids */) |
(...skipping 11 matching lines...) Expand all Loading... | |
103 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_AddScriptClient, | 106 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_AddScriptClient, |
104 int /* thread_id */, | 107 int /* thread_id */, |
105 int /* provider_id */) | 108 int /* provider_id */) |
106 | 109 |
107 // Informs the browser that the scriptable API client is unregistered. | 110 // Informs the browser that the scriptable API client is unregistered. |
108 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_RemoveScriptClient, | 111 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_RemoveScriptClient, |
109 int /* thread_id */, | 112 int /* thread_id */, |
110 int /* provider_id */) | 113 int /* provider_id */) |
111 | 114 |
112 // Informs the browser that install event handling has finished. | 115 // Informs the browser that install event handling has finished. |
113 // Sent via EmbeddedWorker. If there was an exception during the | 116 // Sent via EmbeddedWorker. |
114 // event handling it'll be reported back separately (to be propagated | 117 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_InstallEventFinished, |
115 // to the documents). | 118 content::ServiceWorkerInstallEventResult) |
116 IPC_MESSAGE_CONTROL0(ServiceWorkerHostMsg_InstallEventFinished) | |
117 | 119 |
118 // Informs the browser that fetch event handling has finished. | 120 // Informs the browser that fetch event handling has finished. |
121 // Sent via EmbeddedWorker. | |
119 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_FetchEventFinished, | 122 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_FetchEventFinished, |
120 content::ServiceWorkerFetchEventResult, | 123 content::ServiceWorkerFetchEventResult, |
121 content::ServiceWorkerResponse) | 124 content::ServiceWorkerResponse) |
OLD | NEW |