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

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

Issue 2746783002: [ServiceWorker] Mojofy InstallEvent of Service Worker (Closed)
Patch Set: Rebase and address falken, leon and mek's comments Created 3 years, 8 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // in the browser process. 217 // in the browser process.
218 int GetRoutingID() const { return embedded_worker_id_; } 218 int GetRoutingID() const { return embedded_worker_id_; }
219 219
220 void Send(IPC::Message* message); 220 void Send(IPC::Message* message);
221 void SendWorkerStarted(); 221 void SendWorkerStarted();
222 void SetRegistrationInServiceWorkerGlobalScope( 222 void SetRegistrationInServiceWorkerGlobalScope(
223 const ServiceWorkerRegistrationObjectInfo& info, 223 const ServiceWorkerRegistrationObjectInfo& info,
224 const ServiceWorkerVersionAttributes& attrs); 224 const ServiceWorkerVersionAttributes& attrs);
225 225
226 // mojom::ServiceWorkerEventDispatcher 226 // mojom::ServiceWorkerEventDispatcher
227 void DispatchInstallEvent(
228 mojom::InstallEventMethodAssociatedPtrInfo client,
229 const DispatchInstallEventCallback& callback) override;
227 void DispatchActivateEvent( 230 void DispatchActivateEvent(
228 const DispatchActivateEventCallback& callback) override; 231 const DispatchActivateEventCallback& callback) override;
229 void DispatchBackgroundFetchAbortEvent( 232 void DispatchBackgroundFetchAbortEvent(
230 const std::string& tag, 233 const std::string& tag,
231 const DispatchBackgroundFetchAbortEventCallback& callback) override; 234 const DispatchBackgroundFetchAbortEventCallback& callback) override;
232 void DispatchBackgroundFetchClickEvent( 235 void DispatchBackgroundFetchClickEvent(
233 const std::string& tag, 236 const std::string& tag,
234 mojom::BackgroundFetchState state, 237 mojom::BackgroundFetchState state,
235 const DispatchBackgroundFetchClickEventCallback& callback) override; 238 const DispatchBackgroundFetchClickEventCallback& callback) override;
236 void DispatchBackgroundFetchFailEvent( 239 void DispatchBackgroundFetchFailEvent(
(...skipping 27 matching lines...) Expand all
264 const std::string& tag, 267 const std::string& tag,
265 blink::mojom::BackgroundSyncEventLastChance last_chance, 268 blink::mojom::BackgroundSyncEventLastChance last_chance,
266 const DispatchSyncEventCallback& callback) override; 269 const DispatchSyncEventCallback& callback) override;
267 void DispatchPaymentRequestEvent( 270 void DispatchPaymentRequestEvent(
268 int payment_request_id, 271 int payment_request_id,
269 payments::mojom::PaymentAppRequestPtr app_request, 272 payments::mojom::PaymentAppRequestPtr app_request,
270 payments::mojom::PaymentAppResponseCallbackPtr response_callback, 273 payments::mojom::PaymentAppResponseCallbackPtr response_callback,
271 const DispatchPaymentRequestEventCallback& callback) override; 274 const DispatchPaymentRequestEventCallback& callback) override;
272 void Ping(const PingCallback& callback) override; 275 void Ping(const PingCallback& callback) override;
273 276
274 void OnInstallEvent(int request_id);
275 void OnNotificationClickEvent( 277 void OnNotificationClickEvent(
276 int request_id, 278 int request_id,
277 const std::string& notification_id, 279 const std::string& notification_id,
278 const PlatformNotificationData& notification_data, 280 const PlatformNotificationData& notification_data,
279 int action_index, 281 int action_index,
280 const base::NullableString16& reply); 282 const base::NullableString16& reply);
281 void OnNotificationCloseEvent( 283 void OnNotificationCloseEvent(
282 int request_id, 284 int request_id,
283 const std::string& notification_id, 285 const std::string& notification_id,
284 const PlatformNotificationData& notification_data); 286 const PlatformNotificationData& notification_data);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 scoped_refptr<base::TaskRunner> worker_task_runner_; 327 scoped_refptr<base::TaskRunner> worker_task_runner_;
326 328
327 scoped_refptr<ServiceWorkerProviderContext> provider_context_; 329 scoped_refptr<ServiceWorkerProviderContext> provider_context_;
328 330
329 // Not owned; this object is destroyed when proxy_ becomes invalid. 331 // Not owned; this object is destroyed when proxy_ becomes invalid.
330 blink::WebServiceWorkerContextProxy* proxy_; 332 blink::WebServiceWorkerContextProxy* proxy_;
331 333
332 // This is bound on the worker thread. 334 // This is bound on the worker thread.
333 mojom::ServiceWorkerEventDispatcherRequest pending_dispatcher_request_; 335 mojom::ServiceWorkerEventDispatcherRequest pending_dispatcher_request_;
334 336
337 // The destination for the install event method.
338 mojom::InstallEventMethodAssociatedPtr install_method_client_;
shimazu 2017/04/05 05:01:27 I think you are trying to have the method interfac
339
335 // Renderer-side object corresponding to WebEmbeddedWorkerInstance. 340 // Renderer-side object corresponding to WebEmbeddedWorkerInstance.
336 // This is valid from the ctor to workerContextDestroyed. 341 // This is valid from the ctor to workerContextDestroyed.
337 std::unique_ptr<EmbeddedWorkerInstanceClientImpl> embedded_worker_client_; 342 std::unique_ptr<EmbeddedWorkerInstanceClientImpl> embedded_worker_client_;
338 343
339 // Initialized on the worker thread in workerContextStarted and 344 // Initialized on the worker thread in workerContextStarted and
340 // destructed on the worker thread in willDestroyWorkerContext. 345 // destructed on the worker thread in willDestroyWorkerContext.
341 std::unique_ptr<WorkerContextData> context_; 346 std::unique_ptr<WorkerContextData> context_;
342 347
343 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); 348 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient);
344 }; 349 };
345 350
346 } // namespace content 351 } // namespace content
347 352
348 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 353 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698