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

Unified Diff: content/renderer/service_worker/service_worker_context_client.h

Issue 1171173002: [Background Sync] Use Mojo IPC to fire background sync events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing review comments on event dispatcher Created 5 years, 6 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/renderer/service_worker/service_worker_context_client.h
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
index 0b5b5d7d28588d6ebbc23b8c7aaf5ab7f52afb7e..bc24981b1db44cb633ee873335021f6ececfa785 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -15,6 +15,7 @@
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "content/child/webmessageportchannel_impl.h"
+#include "content/common/background_sync_service.mojom.h"
#include "content/common/service_worker/service_worker_types.h"
#include "ipc/ipc_listener.h"
#include "third_party/WebKit/public/platform/WebGeofencingEventType.h"
@@ -50,6 +51,8 @@ class ServiceWorkerContextClient;
class ThreadSafeSender;
class WebServiceWorkerRegistrationImpl;
+using SyncCallback = mojo::Callback<void(ServiceWorkerEventStatus)>;
jkarlin 2015/06/18 15:41:35 put this in the class instead of the content names
iclelland 2015/06/18 16:01:14 Done. Also addressed analogous situation in Servic
+
// This class provides access to/from an ServiceWorker's WorkerGlobalScope.
// Unless otherwise noted, all methods are called on the worker thread.
class ServiceWorkerContextClient
@@ -144,6 +147,8 @@ class ServiceWorkerContextClient
virtual void stashMessagePort(blink::WebMessagePortChannel* channel,
const blink::WebString& name);
+ virtual void DispatchSyncEvent(const SyncCallback& callbacks);
+
private:
struct WorkerContextData;

Powered by Google App Engine
This is Rietveld 408576698