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 "content/common/service_worker_interfaces.h" | |
| 8 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
| 9 #include "ipc/ipc_param_traits.h" | 10 #include "ipc/ipc_param_traits.h" |
| 10 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" | 11 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" |
| 12 #include "third_party/WebKit/public/web/WebContentSecurityPolicy.h" | |
| 11 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 12 | 14 |
| 13 #undef IPC_MESSAGE_EXPORT | 15 #undef IPC_MESSAGE_EXPORT |
| 14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 15 | 17 |
| 16 #define IPC_MESSAGE_START ServiceWorkerMsgStart | 18 #define IPC_MESSAGE_START ServiceWorkerMsgStart |
| 17 | 19 |
| 18 IPC_ENUM_TRAITS(blink::WebServiceWorkerError::ErrorType) | 20 IPC_ENUM_TRAITS(blink::WebServiceWorkerError::ErrorType) |
| 19 | 21 |
| 20 // Messages sent from the child process to the browser. | 22 // Messages sent from the child process to the browser. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 | 66 |
| 65 // Browser -> Renderer message to create a new embedded worker context. | 67 // Browser -> Renderer message to create a new embedded worker context. |
| 66 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_StartWorker, | 68 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_StartWorker, |
| 67 int /* embedded_worker_id */, | 69 int /* embedded_worker_id */, |
| 68 int64 /* service_worker_version_id */, | 70 int64 /* service_worker_version_id */, |
| 69 GURL /* script_url */) | 71 GURL /* script_url */) |
| 70 | 72 |
| 71 // Browser -> Renderer message to terminate the embedded worker. | 73 // Browser -> Renderer message to terminate the embedded worker. |
| 72 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_TerminateWorker, | 74 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_TerminateWorker, |
| 73 int /* embedded_worker_id */) | 75 int /* embedded_worker_id */) |
| 76 | |
| 77 // Renderer -> Browser message to indicate that the worker is started. | |
| 78 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_WorkerStarted, | |
|
alecflett
2013/12/19 00:59:11
Should the embedded worker messages be called Embe
| |
| 79 int /* thread_id */, | |
| 80 int /* embedded_worker_id */) | |
| 81 | |
| 82 // Renderer -> Browser message to indicate that the worker is stopped. | |
| 83 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_WorkerStopped, | |
| 84 int /* embedded_worker_id */) | |
| 85 | |
| 86 // --------------------------------------------------------------------------- | |
| 87 // For ServiceWorkerContext related messages, which are directly sent from | |
| 88 // browser to the worker thread in the child process. We use a new message class | |
| 89 // for this for easier cross-thread message dispatching. | |
| 90 | |
| 91 #undef IPC_MESSAGE_START | |
| 92 #define IPC_MESSAGE_START ServiceWorkerContextMsgStart | |
| 93 | |
| 94 // TODO: this will need more fields. | |
| 95 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchRequest) | |
| 96 IPC_STRUCT_TRAITS_MEMBER(url) | |
| 97 IPC_STRUCT_TRAITS_MEMBER(method) | |
| 98 IPC_STRUCT_TRAITS_MEMBER(referrer) | |
| 99 IPC_STRUCT_TRAITS_MEMBER(headers) | |
| 100 IPC_STRUCT_TRAITS_MEMBER(is_main_resource_load) | |
| 101 IPC_STRUCT_TRAITS_END() | |
| 102 | |
| 103 IPC_MESSAGE_CONTROL3(ServiceWorkerContextMsg_FetchEvent, | |
| 104 int /* thread_id */, | |
| 105 int /* embedded_worker_id */, | |
| 106 content::ServiceWorkerFetchRequest) | |
| OLD | NEW |