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..8cfa82c1294b520a51b58b5eae39ffbf1d3349bc 100644 |
--- a/content/browser/push_messaging/push_messaging_router.h |
+++ b/content/browser/push_messaging/push_messaging_router.h |
@@ -12,6 +12,7 @@ |
#include "base/memory/weak_ptr.h" |
#include "content/common/service_worker/service_worker_status_code.h" |
#include "content/public/common/push_messaging_status.h" |
+#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" |
#include "url/gurl.h" |
namespace content { |
@@ -19,6 +20,7 @@ namespace content { |
class BrowserContext; |
class ServiceWorkerContextWrapper; |
class ServiceWorkerRegistration; |
+class ServiceWorkerVersion; |
class PushMessagingRouter { |
public: |
@@ -54,6 +56,15 @@ class PushMessagingRouter { |
const scoped_refptr<ServiceWorkerRegistration>& |
service_worker_registration); |
+ // Delivers a push message with |data| to a specific |service_worker|. Must be |
+ // called on the IO thread, with the the worker running. |
+ static void DeliverMessageToWorker( |
+ const scoped_refptr<ServiceWorkerVersion>& service_worker, |
+ const scoped_refptr<ServiceWorkerRegistration>& |
+ service_worker_registration, |
+ const std::string& data, |
+ const DeliverMessageCallback& deliver_message_callback); |
+ |
// Gets called asynchronously after the Service Worker has dispatched the push |
// event. Must be called on the IO thread. |
static void DeliverMessageEnd( |