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

Side by Side Diff: content/renderer/service_worker/service_worker_context_client.h

Issue 2763453002: [ServiceWorker] Convert ping-pong IPC into mojo interface ServiceWorkerEventDispatcher (Closed)
Patch Set: Add a comment into mojom file Created 3 years, 9 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 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 const DispatchNotificationCloseEventCallback& callback) override; 232 const DispatchNotificationCloseEventCallback& callback) override;
233 void DispatchPushEvent(const PushEventPayload& payload, 233 void DispatchPushEvent(const PushEventPayload& payload,
234 const DispatchPushEventCallback& callback) override; 234 const DispatchPushEventCallback& callback) override;
235 void DispatchSyncEvent( 235 void DispatchSyncEvent(
236 const std::string& tag, 236 const std::string& tag,
237 blink::mojom::BackgroundSyncEventLastChance last_chance, 237 blink::mojom::BackgroundSyncEventLastChance last_chance,
238 const DispatchSyncEventCallback& callback) override; 238 const DispatchSyncEventCallback& callback) override;
239 void DispatchPaymentRequestEvent( 239 void DispatchPaymentRequestEvent(
240 payments::mojom::PaymentAppRequestPtr app_request, 240 payments::mojom::PaymentAppRequestPtr app_request,
241 const DispatchPaymentRequestEventCallback& callback) override; 241 const DispatchPaymentRequestEventCallback& callback) override;
242 void Ping(const PingCallback& callback) override;
242 243
243 void OnInstallEvent(int request_id); 244 void OnInstallEvent(int request_id);
244 void OnNotificationClickEvent( 245 void OnNotificationClickEvent(
245 int request_id, 246 int request_id,
246 const std::string& notification_id, 247 const std::string& notification_id,
247 const PlatformNotificationData& notification_data, 248 const PlatformNotificationData& notification_data,
248 int action_index, 249 int action_index,
249 const base::NullableString16& reply); 250 const base::NullableString16& reply);
250 void OnNotificationCloseEvent( 251 void OnNotificationCloseEvent(
251 int request_id, 252 int request_id,
252 const std::string& notification_id, 253 const std::string& notification_id,
253 const PlatformNotificationData& notification_data); 254 const PlatformNotificationData& notification_data);
254 255
255 void OnDidGetClient(int request_id, const ServiceWorkerClientInfo& client); 256 void OnDidGetClient(int request_id, const ServiceWorkerClientInfo& client);
256 void OnDidGetClients( 257 void OnDidGetClients(
257 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); 258 int request_id, const std::vector<ServiceWorkerClientInfo>& clients);
258 void OnOpenWindowResponse(int request_id, 259 void OnOpenWindowResponse(int request_id,
259 const ServiceWorkerClientInfo& client); 260 const ServiceWorkerClientInfo& client);
260 void OnOpenWindowError(int request_id, const std::string& message); 261 void OnOpenWindowError(int request_id, const std::string& message);
261 void OnFocusClientResponse(int request_id, 262 void OnFocusClientResponse(int request_id,
262 const ServiceWorkerClientInfo& client); 263 const ServiceWorkerClientInfo& client);
263 void OnNavigateClientResponse(int request_id, 264 void OnNavigateClientResponse(int request_id,
264 const ServiceWorkerClientInfo& client); 265 const ServiceWorkerClientInfo& client);
265 void OnNavigateClientError(int request_id, const GURL& url); 266 void OnNavigateClientError(int request_id, const GURL& url);
266 void OnDidSkipWaiting(int request_id); 267 void OnDidSkipWaiting(int request_id);
267 void OnDidClaimClients(int request_id); 268 void OnDidClaimClients(int request_id);
268 void OnClaimClientsError(int request_id, 269 void OnClaimClientsError(int request_id,
269 blink::WebServiceWorkerError::ErrorType error_type, 270 blink::WebServiceWorkerError::ErrorType error_type,
270 const base::string16& message); 271 const base::string16& message);
271 void OnPing();
272
273 // Called to resolve the FetchEvent.preloadResponse promise. 272 // Called to resolve the FetchEvent.preloadResponse promise.
274 void OnNavigationPreloadResponse( 273 void OnNavigationPreloadResponse(
275 int fetch_event_id, 274 int fetch_event_id,
276 std::unique_ptr<blink::WebURLResponse> response, 275 std::unique_ptr<blink::WebURLResponse> response,
277 std::unique_ptr<blink::WebDataConsumerHandle> data_consumer_handle); 276 std::unique_ptr<blink::WebDataConsumerHandle> data_consumer_handle);
278 // Called when the navigation preload request completed. Either 277 // Called when the navigation preload request completed. Either
279 // OnNavigationPreloadComplete() or OnNavigationPreloadError() must be called 278 // OnNavigationPreloadComplete() or OnNavigationPreloadError() must be called
280 // to release the preload related resources. 279 // to release the preload related resources.
281 void OnNavigationPreloadComplete(int fetch_event_id); 280 void OnNavigationPreloadComplete(int fetch_event_id);
282 // Called when an error occurred while receiving the response of the 281 // Called when an error occurred while receiving the response of the
(...skipping 27 matching lines...) Expand all
310 // Initialized on the worker thread in workerContextStarted and 309 // Initialized on the worker thread in workerContextStarted and
311 // destructed on the worker thread in willDestroyWorkerContext. 310 // destructed on the worker thread in willDestroyWorkerContext.
312 std::unique_ptr<WorkerContextData> context_; 311 std::unique_ptr<WorkerContextData> context_;
313 312
314 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); 313 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient);
315 }; 314 };
316 315
317 } // namespace content 316 } // namespace content
318 317
319 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 318 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698