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