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

Unified Diff: content/browser/push_messaging/push_messaging_router.h

Issue 1579413004: Move push event dispatching out of ServiceWorkerVersion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/push_messaging/push_messaging_router.h
diff --git a/content/browser/push_messaging/push_messaging_router.h b/content/browser/push_messaging/push_messaging_router.h
index dae9973de2627030fd2c66440d4a3b7434b48b51..4bae3e5efd368d79f417886637ff06963ed2f2d7 100644
--- a/content/browser/push_messaging/push_messaging_router.h
+++ b/content/browser/push_messaging/push_messaging_router.h
@@ -19,6 +19,7 @@ namespace content {
class BrowserContext;
class ServiceWorkerContextWrapper;
class ServiceWorkerRegistration;
+class ServiceWorkerVersion;
class PushMessagingRouter {
public:
@@ -34,6 +35,13 @@ class PushMessagingRouter {
const std::string& data,
const DeliverMessageCallback& deliver_message_callback);
+ // Delivers a push message with |data| to a specific |service_worker|. Must be
+ // called on the IO thread.
+ static void DeliverMessageToWorker(
johnme 2016/01/18 19:06:19 It's kind of messy that there are now two public m
Marijn Kruisselbrink 2016/01/20 01:06:31 The only reason there is a second public method is
Peter Beverloo 2016/01/20 11:48:40 How common is the fetch() paradigm? As far as I'm
Peter Beverloo 2016/01/20 11:48:40 Let's kill the button? I don't think anybody uses
+ const scoped_refptr<ServiceWorkerVersion>& service_worker,
+ const std::string& data,
+ const base::Callback<void(ServiceWorkerStatusCode)>& callback);
+
private:
// Attempts to find a Service Worker registration so that a push event can be
// dispatched. Must be called on the IO thread.

Powered by Google App Engine
This is Rietveld 408576698