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

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

Issue 629393002: Chromium side of geofencing event dispatching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@geofencing_serviceworker
Patch Set: Created 6 years, 2 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/service_worker/service_worker_status_code.h" 11 #include "content/common/service_worker/service_worker_status_code.h"
12 #include "content/common/service_worker/service_worker_types.h" 12 #include "content/common/service_worker/service_worker_types.h"
13 #include "ipc/ipc_message_macros.h" 13 #include "ipc/ipc_message_macros.h"
14 #include "ipc/ipc_param_traits.h" 14 #include "ipc/ipc_param_traits.h"
15 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h"
16 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h"
15 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h" 17 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h"
16 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" 18 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h"
17 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" 19 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h"
18 #include "url/gurl.h" 20 #include "url/gurl.h"
19 21
20 #undef IPC_MESSAGE_EXPORT 22 #undef IPC_MESSAGE_EXPORT
21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 23 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
22 24
23 #define IPC_MESSAGE_START ServiceWorkerMsgStart 25 #define IPC_MESSAGE_START ServiceWorkerMsgStart
24 26
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerVersionAttributes) 94 IPC_STRUCT_TRAITS_BEGIN(content::ServiceWorkerVersionAttributes)
93 IPC_STRUCT_TRAITS_MEMBER(installing) 95 IPC_STRUCT_TRAITS_MEMBER(installing)
94 IPC_STRUCT_TRAITS_MEMBER(waiting) 96 IPC_STRUCT_TRAITS_MEMBER(waiting)
95 IPC_STRUCT_TRAITS_MEMBER(active) 97 IPC_STRUCT_TRAITS_MEMBER(active)
96 IPC_STRUCT_TRAITS_END() 98 IPC_STRUCT_TRAITS_END()
97 99
98 IPC_ENUM_TRAITS_MAX_VALUE( 100 IPC_ENUM_TRAITS_MAX_VALUE(
99 blink::WebServiceWorkerCacheError, 101 blink::WebServiceWorkerCacheError,
100 blink::WebServiceWorkerCacheErrorLast) 102 blink::WebServiceWorkerCacheErrorLast)
101 103
104 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebGeofencingEventType,
105 blink::WebGeofencingEventTypeLast)
106
102 //--------------------------------------------------------------------------- 107 //---------------------------------------------------------------------------
103 // Messages sent from the child process to the browser. 108 // Messages sent from the child process to the browser.
104 109
105 IPC_MESSAGE_CONTROL5(ServiceWorkerHostMsg_RegisterServiceWorker, 110 IPC_MESSAGE_CONTROL5(ServiceWorkerHostMsg_RegisterServiceWorker,
106 int /* thread_id */, 111 int /* thread_id */,
107 int /* request_id */, 112 int /* request_id */,
108 int /* provider_id */, 113 int /* provider_id */,
109 GURL /* scope */, 114 GURL /* scope */,
110 GURL /* script_url */) 115 GURL /* script_url */)
111 116
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 int /* request_id */, 173 int /* request_id */,
169 blink::WebServiceWorkerEventResult) 174 blink::WebServiceWorkerEventResult)
170 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_FetchEventFinished, 175 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_FetchEventFinished,
171 int /* request_id */, 176 int /* request_id */,
172 content::ServiceWorkerFetchEventResult, 177 content::ServiceWorkerFetchEventResult,
173 content::ServiceWorkerResponse) 178 content::ServiceWorkerResponse)
174 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_SyncEventFinished, 179 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_SyncEventFinished,
175 int /* request_id */) 180 int /* request_id */)
176 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_PushEventFinished, 181 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_PushEventFinished,
177 int /* request_id */) 182 int /* request_id */)
183 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_GeofencingEventFinished,
184 int /* request_id */)
178 185
179 // Asks the browser to retrieve documents controlled by the sender 186 // Asks the browser to retrieve documents controlled by the sender
180 // ServiceWorker. 187 // ServiceWorker.
181 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_GetClientDocuments, 188 IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_GetClientDocuments,
182 int /* request_id */) 189 int /* request_id */)
183 190
184 // Sends a 'message' event to a client document (renderer->browser). 191 // Sends a 'message' event to a client document (renderer->browser).
185 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_PostMessageToDocument, 192 IPC_MESSAGE_ROUTED3(ServiceWorkerHostMsg_PostMessageToDocument,
186 int /* client_id */, 193 int /* client_id */,
187 base::string16 /* message */, 194 base::string16 /* message */,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_ActivateEvent, 346 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_ActivateEvent,
340 int /* request_id */) 347 int /* request_id */)
341 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_FetchEvent, 348 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_FetchEvent,
342 int /* request_id */, 349 int /* request_id */,
343 content::ServiceWorkerFetchRequest) 350 content::ServiceWorkerFetchRequest)
344 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_SyncEvent, 351 IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_SyncEvent,
345 int /* request_id */) 352 int /* request_id */)
346 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_PushEvent, 353 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_PushEvent,
347 int /* request_id */, 354 int /* request_id */,
348 std::string /* data */) 355 std::string /* data */)
356 IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_GeofencingEvent,
357 int /* request_id */,
358 blink::WebGeofencingEventType /* event_type */,
359 std::string /* region_id */,
360 blink::WebCircularGeofencingRegion /* region */)
349 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_MessageToWorker, 361 IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_MessageToWorker,
350 base::string16 /* message */, 362 base::string16 /* message */,
351 std::vector<int> /* sent_message_port_ids */, 363 std::vector<int> /* sent_message_port_ids */,
352 std::vector<int> /* new_routing_ids */) 364 std::vector<int> /* new_routing_ids */)
353 365
354 // Sent via EmbeddedWorker as a response of GetClientDocuments. 366 // Sent via EmbeddedWorker as a response of GetClientDocuments.
355 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_DidGetClientDocuments, 367 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_DidGetClientDocuments,
356 int /* request_id */, 368 int /* request_id */,
357 std::vector<int> /* client_ids */) 369 std::vector<int> /* client_ids */)
358 370
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 blink::WebServiceWorkerCacheError) 420 blink::WebServiceWorkerCacheError)
409 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllError, 421 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheMatchAllError,
410 int /* request_id */, 422 int /* request_id */,
411 blink::WebServiceWorkerCacheError) 423 blink::WebServiceWorkerCacheError)
412 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysError, 424 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheKeysError,
413 int /* request_id */, 425 int /* request_id */,
414 blink::WebServiceWorkerCacheError) 426 blink::WebServiceWorkerCacheError)
415 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchError, 427 IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_CacheBatchError,
416 int /* request_id */, 428 int /* request_id */,
417 blink::WebServiceWorkerCacheError) 429 blink::WebServiceWorkerCacheError)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698