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

Unified Diff: content/browser/service_worker/service_worker_version.h

Issue 205033002: Browser side of new ServiceWorker 'sync' event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_version.h
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index d5463c49f2e1cc0f4109c7662e0fccdb4e6dbbe1..cc534abaf3210d41d9e425ebe67671f84ab560a5 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -150,6 +150,13 @@ class CONTENT_EXPORT ServiceWorkerVersion
void DispatchFetchEvent(const ServiceWorkerFetchRequest& request,
const FetchCallback& callback);
+ // Sends sync event to the associated embedded worker and asynchronously calls
+ // |callback| when it errors out or it gets response from the worker to notify
+ // completion.
+ //
+ // This must be called when the status() is ACTIVE.
+ void DispatchSyncEvent(const StatusCallback& callback);
+
// These are expected to be called when a renderer process host for the
// same-origin as for this ServiceWorkerVersion is created. The added
// processes are used to run an in-renderer embedded worker.

Powered by Google App Engine
This is Rietveld 408576698