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

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

Issue 871013003: Gather the ServiceWorker client information in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rfh_getvisibilitystate
Patch Set: Created 5 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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "content/common/navigator_connect_types.h" 11 #include "content/common/navigator_connect_types.h"
12 #include "content/common/service_worker/service_worker_client_info.h"
12 #include "content/common/service_worker/service_worker_status_code.h" 13 #include "content/common/service_worker/service_worker_status_code.h"
14 #include "content/common/service_worker/service_worker_traits.h"
13 #include "content/common/service_worker/service_worker_types.h" 15 #include "content/common/service_worker/service_worker_types.h"
14 #include "content/public/common/platform_notification_data.h" 16 #include "content/public/common/platform_notification_data.h"
15 #include "ipc/ipc_message_macros.h" 17 #include "ipc/ipc_message_macros.h"
16 #include "ipc/ipc_param_traits.h" 18 #include "ipc/ipc_param_traits.h"
17 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h" 19 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h"
18 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" 20 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h"
19 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h" 21 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h"
20 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" 22 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h"
21 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" 23 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h"
22 #include "url/gurl.h" 24 #include "url/gurl.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 IPC_STRUCT_TRAITS_MEMBER(scope) 98 IPC_STRUCT_TRAITS_MEMBER(scope)
97 IPC_STRUCT_TRAITS_MEMBER(registration_id) 99 IPC_STRUCT_TRAITS_MEMBER(registration_id)
98 IPC_STRUCT_TRAITS_END() 100 IPC_STRUCT_TRAITS_END()
99 101
100 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerVersionAttributes) 102 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerVersionAttributes)
101 IPC_STRUCT_TRAITS_MEMBER(installing) 103 IPC_STRUCT_TRAITS_MEMBER(installing)
102 IPC_STRUCT_TRAITS_MEMBER(waiting) 104 IPC_STRUCT_TRAITS_MEMBER(waiting)
103 IPC_STRUCT_TRAITS_MEMBER(active) 105 IPC_STRUCT_TRAITS_MEMBER(active)
104 IPC_STRUCT_TRAITS_END() 106 IPC_STRUCT_TRAITS_END()
105 107
106 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerClientInfo)
107 IPC_STRUCT_TRAITS_MEMBER(client_id)
108 IPC_STRUCT_TRAITS_MEMBER(page_visibility_state)
109 IPC_STRUCT_TRAITS_MEMBER(is_focused)
110 IPC_STRUCT_TRAITS_MEMBER(url)
111 IPC_STRUCT_TRAITS_MEMBER(frame_type)
112 IPC_STRUCT_TRAITS_END()
113
114 IPC_ENUM_TRAITS_MAX_VALUE( 108 IPC_ENUM_TRAITS_MAX_VALUE(
115 blink::WebServiceWorkerCacheError, 109 blink::WebServiceWorkerCacheError,
116 blink::WebServiceWorkerCacheErrorLast) 110 blink::WebServiceWorkerCacheErrorLast)
117 111
118 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebGeofencingEventType, 112 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebGeofencingEventType,
119 blink::WebGeofencingEventTypeLast) 113 blink::WebGeofencingEventTypeLast)
120 114
121 //--------------------------------------------------------------------------- 115 //---------------------------------------------------------------------------
122 // Messages sent from the child process to the browser. 116 // Messages sent from the child process to the browser.
123 117
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_PostMessageToDocument, 214 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_PostMessageToDocument,
221 int /* client_id */, 215 int /* client_id */,
222 base::string16 /* message */, 216 base::string16 /* message */,
223 std::vector<int> /* sent_message_port_ids */) 217 std::vector<int> /* sent_message_port_ids */)
224 218
225 // Ask the browser to focus a client (renderer->browser). 219 // Ask the browser to focus a client (renderer->browser).
226 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_FocusClient, 220 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_FocusClient,
227 int /* request_id */, 221 int /* request_id */,
228 int /* client_id */) 222 int /* client_id */)
229 223
230 // Response to ServiceWorkerMsg_GetClientInfo.
231 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_GetClientInfoSuccess,
232 int /* request_id */,
233 content::ServiceWorkerClientInfo)
234
235 // Response to ServiceWorkerMsg_GetClientInfo.
236 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_GetClientInfoError,
237 int /* request_id */)
238
239 // Asks the browser to force this worker to become activated. 224 // Asks the browser to force this worker to become activated.
240 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_SkipWaiting, 225 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_SkipWaiting,
241 int /* request_id */) 226 int /* request_id */)
242 227
243 // CacheStorage operations in the browser. 228 // CacheStorage operations in the browser.
244 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageHas, 229 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageHas,
245 int /* request_id */, 230 int /* request_id */,
246 base::string16 /* fetch_store_name */) 231 base::string16 /* fetch_store_name */)
247 232
248 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageOpen, 233 IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_CacheStorageOpen,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 bool /* should_notify_controllerchange */) 368 bool /* should_notify_controllerchange */)
384 369
385 // Sends a 'message' event to a client document (browser->renderer). 370 // Sends a 'message' event to a client document (browser->renderer).
386 IPC_MESSAGE_CONTROL5(ServiceWorkerMsg_MessageToDocument, 371 IPC_MESSAGE_CONTROL5(ServiceWorkerMsg_MessageToDocument,
387 int /* thread_id */, 372 int /* thread_id */,
388 int /* provider_id */, 373 int /* provider_id */,
389 base::string16 /* message */, 374 base::string16 /* message */,
390 std::vector<int> /* sent_message_port_ids */, 375 std::vector<int> /* sent_message_port_ids */,
391 std::vector<int> /* new_routing_ids */) 376 std::vector<int> /* new_routing_ids */)
392 377
393 // Sent to client documents to request document properties.
394 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_GetClientInfo,
395 int /* thread_id */,
396 int /* embedded_worker_id */,
397 int /* request_id */,
398 int /* provider_id */)
399
400 // Sent via EmbeddedWorker to dispatch events. 378 // Sent via EmbeddedWorker to dispatch events.
401 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_InstallEvent, 379 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_InstallEvent,
402 int /* request_id */, 380 int /* request_id */,
403 int /* active_version_id */) 381 int /* active_version_id */)
404 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_ActivateEvent, 382 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_ActivateEvent,
405 int /* request_id */) 383 int /* request_id */)
406 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_FetchEvent, 384 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_FetchEvent,
407 int /* request_id */, 385 int /* request_id */,
408 content::ServiceWorkerFetchRequest) 386 content::ServiceWorkerFetchRequest)
409 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_SyncEvent, 387 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_SyncEvent,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 blink::WebServiceWorkerCacheError) 475 blink::WebServiceWorkerCacheError)
498 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllError, 476 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllError,
499 int /* request_id */, 477 int /* request_id */,
500 blink::WebServiceWorkerCacheError) 478 blink::WebServiceWorkerCacheError)
501 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysError, 479 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysError,
502 int /* request_id */, 480 int /* request_id */,
503 blink::WebServiceWorkerCacheError) 481 blink::WebServiceWorkerCacheError)
504 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchError, 482 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchError,
505 int /* request_id */, 483 int /* request_id */,
506 blink::WebServiceWorkerCacheError) 484 blink::WebServiceWorkerCacheError)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698