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

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: rebase 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 bool /* should_notify_controllerchange */) 376 bool /* should_notify_controllerchange */)
392 377
393 // Sends a 'message' event to a client document (browser->renderer). 378 // Sends a 'message' event to a client document (browser->renderer).
394 IPC_MESSAGE_CONTROL5(ServiceWorkerMsg_MessageToDocument, 379 IPC_MESSAGE_CONTROL5(ServiceWorkerMsg_MessageToDocument,
395 int /* thread_id */, 380 int /* thread_id */,
396 int /* provider_id */, 381 int /* provider_id */,
397 base::string16 /* message */, 382 base::string16 /* message */,
398 std::vector<int> /* sent_message_port_ids */, 383 std::vector<int> /* sent_message_port_ids */,
399 std::vector<int> /* new_routing_ids */) 384 std::vector<int> /* new_routing_ids */)
400 385
401 // Sent to client documents to request document properties.
402 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_GetClientInfo,
403 int /* thread_id */,
404 int /* embedded_worker_id */,
405 int /* request_id */,
406 int /* provider_id */)
407
408 // Sent via EmbeddedWorker to dispatch events. 386 // Sent via EmbeddedWorker to dispatch events.
409 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_InstallEvent, 387 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_InstallEvent,
410 int /* request_id */, 388 int /* request_id */,
411 int /* active_version_id */) 389 int /* active_version_id */)
412 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_ActivateEvent, 390 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_ActivateEvent,
413 int /* request_id */) 391 int /* request_id */)
414 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_FetchEvent, 392 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_FetchEvent,
415 int /* request_id */, 393 int /* request_id */,
416 content::ServiceWorkerFetchRequest) 394 content::ServiceWorkerFetchRequest)
417 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_SyncEvent, 395 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_SyncEvent,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 blink::WebServiceWorkerCacheError) 483 blink::WebServiceWorkerCacheError)
506 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllError, 484 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllError,
507 int /* request_id */, 485 int /* request_id */,
508 blink::WebServiceWorkerCacheError) 486 blink::WebServiceWorkerCacheError)
509 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysError, 487 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysError,
510 int /* request_id */, 488 int /* request_id */,
511 blink::WebServiceWorkerCacheError) 489 blink::WebServiceWorkerCacheError)
512 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchError, 490 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchError,
513 int /* request_id */, 491 int /* request_id */,
514 blink::WebServiceWorkerCacheError) 492 blink::WebServiceWorkerCacheError)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698