Chromium Code Reviews| 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 "third_party/WebKit/public/platform/WebServiceWorkerError.h" | |
| 10 #include "url/gurl.h" | 11 #include "url/gurl.h" |
| 11 | 12 |
| 13 #undef IPC_MESSAGE_EXPORT | |
| 14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | |
| 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 // Sent when any kind of registration error occurs during a | |
| 47 // RegisterServiceWorker / UnregisterServiceWorker handler above. In | |
| 48 // the future this can expand to include the actual reason for the | |
| 49 // error, or even be split if there is a significant difference | |
| 50 // between registration and unregistration errors. | |
|
michaeln
2013/10/25 21:41:25
The first sentence looks good enough.
alecflett
2013/10/25 23:41:56
Done.
| |
| 51 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError, | |
| 52 int32 /* thread_id */, | |
| 53 int32 /* request_id */, | |
| 54 WebKit::WebServiceWorkerError::ErrorType /* code */, | |
| 55 string16 /* message */) | |
|
michaeln
2013/10/25 21:41:25
should we use utf8 here and upsample at the WebKit
alecflett
2013/10/25 23:41:56
It's fairly common to just use the enum and IPC_EN
michaeln
2013/10/26 00:41:01
I was asking about the string value type?
We coul
alecflett
2013/10/28 17:03:14
Oh I see. I personally prefer doing the conversion
| |
| OLD | NEW |