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_types.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" | |
|
jochen (gone - plz use gerrit)
2013/12/20 09:15:58
why do you need this?
kinuko
2013/12/20 10:12:42
Nope, was a remnant of old change. Removed.
| |
| 11 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 12 | 14 |
| 15 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerFetchRequest) | |
| 16 IPC_STRUCT_TRAITS_MEMBER(url) | |
| 17 IPC_STRUCT_TRAITS_MEMBER(method) | |
| 18 IPC_STRUCT_TRAITS_MEMBER(headers) | |
| 19 IPC_STRUCT_TRAITS_END() | |
| 20 | |
| 13 #undef IPC_MESSAGE_EXPORT | 21 #undef IPC_MESSAGE_EXPORT |
| 14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 22 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 15 | 23 |
| 16 #define IPC_MESSAGE_START ServiceWorkerMsgStart | 24 #define IPC_MESSAGE_START ServiceWorkerMsgStart |
| 17 | 25 |
| 18 IPC_ENUM_TRAITS(blink::WebServiceWorkerError::ErrorType) | 26 IPC_ENUM_TRAITS(blink::WebServiceWorkerError::ErrorType) |
| 19 | 27 |
| 20 // Messages sent from the child process to the browser. | 28 // Messages sent from the child process to the browser. |
| 21 | 29 |
| 22 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_RegisterServiceWorker, | 30 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_RegisterServiceWorker, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated, | 64 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated, |
| 57 int /* provider_id */) | 65 int /* provider_id */) |
| 58 | 66 |
| 59 // Informs the browser of a ServiceWorkerProvider being destroyed. | 67 // Informs the browser of a ServiceWorkerProvider being destroyed. |
| 60 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed, | 68 IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed, |
| 61 int /* provider_id */) | 69 int /* provider_id */) |
| 62 | 70 |
| 63 // For EmbeddedWorker related messages ------------------------------------- | 71 // For EmbeddedWorker related messages ------------------------------------- |
| 64 | 72 |
| 65 // Browser -> Renderer message to create a new embedded worker context. | 73 // Browser -> Renderer message to create a new embedded worker context. |
| 66 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_StartWorker, | 74 IPC_MESSAGE_CONTROL3(EmbeddedWorkerMsg_StartWorker, |
| 67 int /* embedded_worker_id */, | 75 int /* embedded_worker_id */, |
| 68 int64 /* service_worker_version_id */, | 76 int64 /* service_worker_version_id */, |
| 69 GURL /* script_url */) | 77 GURL /* script_url */) |
| 70 | 78 |
| 71 // Browser -> Renderer message to terminate the embedded worker. | 79 // Browser -> Renderer message to stop (terminate) the embedded worker. |
| 72 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_TerminateWorker, | 80 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StopWorker, |
| 73 int /* embedded_worker_id */) | 81 int /* embedded_worker_id */) |
| 82 | |
| 83 // Renderer -> Browser message to indicate that the worker is started. | |
| 84 IPC_MESSAGE_CONTROL2(EmbeddedWorkerHostMsg_WorkerStarted, | |
| 85 int /* thread_id */, | |
| 86 int /* embedded_worker_id */) | |
| 87 | |
| 88 // Renderer -> Browser message to indicate that the worker is stopped. | |
| 89 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerStopped, | |
| 90 int /* embedded_worker_id */) | |
| 91 | |
| 92 // --------------------------------------------------------------------------- | |
| 93 // For EmbeddedWorkerContext related messages, which are directly sent from | |
| 94 // browser to the worker thread in the child process. We use a new message class | |
| 95 // for this for easier cross-thread message dispatching. | |
| 96 | |
| 97 #undef IPC_MESSAGE_START | |
| 98 #define IPC_MESSAGE_START EmbeddedWorkerContextMsgStart | |
| 99 | |
| 100 IPC_MESSAGE_CONTROL3(EmbeddedWorkerContextMsg_FetchEvent, | |
| 101 int /* thread_id */, | |
| 102 int /* embedded_worker_id */, | |
| 103 content::ServiceWorkerFetchRequest) | |
| OLD | NEW |