Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Side by Side Diff: content/common/service_worker/service_worker_messages.h

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Cleanup Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "content/common/service_worker/service_worker_client_info.h" 14 #include "content/common/service_worker/service_worker_client_info.h"
15 #include "content/common/service_worker/service_worker_status_code.h" 15 #include "content/common/service_worker/service_worker_status_code.h"
16 #include "content/common/service_worker/service_worker_types.h" 16 #include "content/common/service_worker/service_worker_types.h"
17 #include "content/public/common/message_port.h"
17 #include "content/public/common/platform_notification_data.h" 18 #include "content/public/common/platform_notification_data.h"
18 #include "content/public/common/push_event_payload.h" 19 #include "content/public/common/push_event_payload.h"
19 #include "ipc/ipc_message_macros.h" 20 #include "ipc/ipc_message_macros.h"
20 #include "ipc/ipc_param_traits.h" 21 #include "ipc/ipc_param_traits.h"
21 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerError.h" 22 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerError.h"
22 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerEventResult.h" 23 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerEventResult.h"
23 #include "url/gurl.h" 24 #include "url/gurl.h"
24 #include "url/origin.h" 25 #include "url/origin.h"
25 26
26 #undef IPC_MESSAGE_EXPORT 27 #undef IPC_MESSAGE_EXPORT
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerClientQueryOptions) 131 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerClientQueryOptions)
131 IPC_STRUCT_TRAITS_MEMBER(client_type) 132 IPC_STRUCT_TRAITS_MEMBER(client_type)
132 IPC_STRUCT_TRAITS_MEMBER(include_uncontrolled) 133 IPC_STRUCT_TRAITS_MEMBER(include_uncontrolled)
133 IPC_STRUCT_TRAITS_END() 134 IPC_STRUCT_TRAITS_END()
134 135
135 IPC_STRUCT_BEGIN(ServiceWorkerMsg_MessageToDocument_Params) 136 IPC_STRUCT_BEGIN(ServiceWorkerMsg_MessageToDocument_Params)
136 IPC_STRUCT_MEMBER(int, thread_id) 137 IPC_STRUCT_MEMBER(int, thread_id)
137 IPC_STRUCT_MEMBER(int, provider_id) 138 IPC_STRUCT_MEMBER(int, provider_id)
138 IPC_STRUCT_MEMBER(content::ServiceWorkerObjectInfo, service_worker_info) 139 IPC_STRUCT_MEMBER(content::ServiceWorkerObjectInfo, service_worker_info)
139 IPC_STRUCT_MEMBER(base::string16, message) 140 IPC_STRUCT_MEMBER(base::string16, message)
140 IPC_STRUCT_MEMBER(std::vector<int>, message_ports) 141 IPC_STRUCT_MEMBER(std::vector<content::MessagePort>, message_ports)
141 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
142 IPC_STRUCT_END() 142 IPC_STRUCT_END()
143 143
144 IPC_STRUCT_TRAITS_BEGIN(content::PushEventPayload) 144 IPC_STRUCT_TRAITS_BEGIN(content::PushEventPayload)
145 IPC_STRUCT_TRAITS_MEMBER(data) 145 IPC_STRUCT_TRAITS_MEMBER(data)
146 IPC_STRUCT_TRAITS_MEMBER(is_null) 146 IPC_STRUCT_TRAITS_MEMBER(is_null)
147 IPC_STRUCT_TRAITS_END() 147 IPC_STRUCT_TRAITS_END()
148 148
149 //--------------------------------------------------------------------------- 149 //---------------------------------------------------------------------------
150 // Messages sent from the child process to the browser. 150 // Messages sent from the child process to the browser.
151 151
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 int64_t /* registration_id */, 207 int64_t /* registration_id */,
208 std::string /* header_value */) 208 std::string /* header_value */)
209 209
210 // Sends ExtendableMessageEvent to a service worker (renderer->browser). 210 // Sends ExtendableMessageEvent to a service worker (renderer->browser).
211 IPC_MESSAGE_CONTROL5( 211 IPC_MESSAGE_CONTROL5(
212 ServiceWorkerHostMsg_PostMessageToWorker, 212 ServiceWorkerHostMsg_PostMessageToWorker,
213 int /* handle_id */, 213 int /* handle_id */,
214 int /* provider_id */, 214 int /* provider_id */,
215 base::string16 /* message */, 215 base::string16 /* message */,
216 url::Origin /* source_origin */, 216 url::Origin /* source_origin */,
217 std::vector<int> /* sent_message_ports */) 217 std::vector<content::MessagePort> /* sent_message_ports */)
218 218
219 // Informs the browser of a new ServiceWorkerProvider in the child process, 219 // Informs the browser of a new ServiceWorkerProvider in the child process,
220 // |provider_id| is unique within its child process. When this provider is 220 // |provider_id| is unique within its child process. When this provider is
221 // created for a document, |route_id| is the frame ID of it. When this provider 221 // created for a document, |route_id| is the frame ID of it. When this provider
222 // is created for a Shared Worker, |route_id| is the Shared Worker route ID. 222 // is created for a Shared Worker, |route_id| is the Shared Worker route ID.
223 // When this provider is created for a Service Worker, |route_id| is 223 // When this provider is created for a Service Worker, |route_id| is
224 // MSG_ROUTING_NONE. |provider_type| identifies whether this provider is for 224 // MSG_ROUTING_NONE. |provider_type| identifies whether this provider is for
225 // Service Worker controllees (documents and Shared Workers) or for controllers 225 // Service Worker controllees (documents and Shared Workers) or for controllers
226 // (Service Workers). 226 // (Service Workers).
227 // 227 //
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // Asks the browser to retrieve clients of the sender ServiceWorker. 316 // Asks the browser to retrieve clients of the sender ServiceWorker.
317 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_GetClients, 317 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_GetClients,
318 int /* request_id */, 318 int /* request_id */,
319 content::ServiceWorkerClientQueryOptions) 319 content::ServiceWorkerClientQueryOptions)
320 320
321 // Sends MessageEvent to a client (renderer->browser). 321 // Sends MessageEvent to a client (renderer->browser).
322 IPC_MESSAGE_ROUTED3( 322 IPC_MESSAGE_ROUTED3(
323 ServiceWorkerHostMsg_PostMessageToClient, 323 ServiceWorkerHostMsg_PostMessageToClient,
324 std::string /* uuid */, 324 std::string /* uuid */,
325 base::string16 /* message */, 325 base::string16 /* message */,
326 std::vector<int> /* sent_message_ports */) 326 std::vector<content::MessagePort> /* sent_message_ports */)
327 327
328 // ServiceWorker -> Browser message to request that the ServiceWorkerStorage 328 // ServiceWorker -> Browser message to request that the ServiceWorkerStorage
329 // cache |data| associated with |url|. 329 // cache |data| associated with |url|.
330 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_SetCachedMetadata, 330 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_SetCachedMetadata,
331 GURL /* url */, 331 GURL /* url */,
332 std::vector<char> /* data */) 332 std::vector<char> /* data */)
333 333
334 // ServiceWorker -> Browser message to request that the ServiceWorkerStorage 334 // ServiceWorker -> Browser message to request that the ServiceWorkerStorage
335 // clear the cache associated with |url|. 335 // clear the cache associated with |url|.
336 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_ClearCachedMetadata, GURL /* url */) 336 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_ClearCachedMetadata, GURL /* url */)
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 579
580 // Sent via EmbeddedWorker as a response of NavigateClient. 580 // Sent via EmbeddedWorker as a response of NavigateClient.
581 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientResponse, 581 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientResponse,
582 int /* request_id */, 582 int /* request_id */,
583 content::ServiceWorkerClientInfo /* client */) 583 content::ServiceWorkerClientInfo /* client */)
584 584
585 // Sent via EmbeddedWorker as an error response of NavigateClient. 585 // Sent via EmbeddedWorker as an error response of NavigateClient.
586 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientError, 586 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_NavigateClientError,
587 int /* request_id */, 587 int /* request_id */,
588 GURL /* url */) 588 GURL /* url */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698