OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ipc/ipc_message_macros.h" | 8 #include "ipc/ipc_message_macros.h" |
9 #include "ipc/ipc_param_traits.h" | 9 #include "ipc/ipc_param_traits.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
11 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" | |
Tom Sepez
2013/10/25 18:46:59
nit: include order.
| |
12 | |
13 #undef IPC_MESSAGE_EXPORT | |
14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | |
11 | 15 |
12 #define IPC_MESSAGE_START ServiceWorkerMsgStart | 16 #define IPC_MESSAGE_START ServiceWorkerMsgStart |
13 | 17 |
18 IPC_ENUM_TRAITS(WebKit::WebServiceWorkerError::ErrorType) | |
19 | |
14 // Messages sent from the child process to the browser. | 20 // Messages sent from the child process to the browser. |
15 | 21 |
16 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_RegisterServiceWorker, | 22 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_RegisterServiceWorker, |
17 int32 /* thread_id */, | 23 int32 /* thread_id */, |
18 int32 /* request_id */, | 24 int32 /* request_id */, |
19 GURL /* scope */, | 25 GURL /* scope */, |
20 GURL /* script_url */) | 26 GURL /* script_url */) |
21 | 27 |
22 IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_UnregisterServiceWorker, | 28 IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_UnregisterServiceWorker, |
23 int32 /* thread_id */, | 29 int32 /* thread_id */, |
24 int32 /* request_id */, | 30 int32 /* request_id */, |
25 GURL /* scope (url pattern) */) | 31 GURL /* scope (url pattern) */) |
26 | 32 |
27 // Messages sent from the browser to the child process. | 33 // Messages sent from the browser to the child process. |
28 | 34 |
29 // Response to ServiceWorkerMsg_RegisterServiceWorker | 35 // Response to ServiceWorkerMsg_RegisterServiceWorker |
30 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered, | 36 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered, |
31 int32 /* thread_id */, | 37 int32 /* thread_id */, |
32 int32 /* request_id */, | 38 int32 /* request_id */, |
33 int64 /* service_worker_id */) | 39 int64 /* service_worker_id */) |
34 | 40 |
35 // Response to ServiceWorkerMsg_UnregisterServiceWorker | 41 // Response to ServiceWorkerMsg_UnregisterServiceWorker |
36 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered, | 42 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered, |
37 int32 /* thread_id */, | 43 int32 /* thread_id */, |
38 int32 /* request_id */) | 44 int32 /* request_id */) |
45 | |
46 // Any kind of registration error from RegisterServiceWorker / | |
Tom Sepez
2013/10/25 18:46:59
nit: this isn't a sentence, its a sentence fragmen
alecflett
2013/10/25 20:05:02
Done.
| |
47 // UnregisterServiceWorker above. This can expand to include the | |
48 // actual reason for the error, or even be split if there is a | |
Tom Sepez
2013/10/25 18:46:59
nit: do you mean, "In the future, this could expan
alecflett
2013/10/25 20:05:02
Done.
| |
49 // significant difference between registration and unregistration | |
50 // errors. | |
51 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError, | |
52 int32 /* thread_id */, | |
53 int32 /* request_id */, | |
54 WebKit::WebServiceWorkerError::ErrorType /* code */, | |
55 string16 /* message */) | |
Tom Sepez
2013/10/25 18:46:59
nit: do we need to pass a string here? Does it con
alecflett
2013/10/25 20:05:02
Yes, there is such a mapping in Blink.
michaeln
2013/10/25 21:41:25
There is a generic mapping from Type to string, bu
| |
OLD | NEW |