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

Unified Diff: content/public/browser/browser_context.h

Issue 340773006: Dispatch push event to worker from PushServiceImpl#OnMessage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. Created 6 years, 4 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
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/common/push_messaging_status.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/browser_context.h
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h
index 1e2564fddc7cece66b82cd70cc43f1a81aa3fbbf..147eab32d612742989f1c7045be97ff0ef926bd6 100644
--- a/content/public/browser/browser_context.h
+++ b/content/public/browser/browser_context.h
@@ -10,6 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/supports_user_data.h"
#include "content/common/content_export.h"
+#include "content/public/common/push_messaging_status.h"
class GURL;
@@ -86,6 +87,15 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
const char* data, size_t length,
const BlobCallback& callback);
+ // Delivers a push message with |data| to the Service Worker identified by
+ // |origin| and |service_worker_registration_id|.
+ static void DeliverPushMessage(
+ BrowserContext* browser_context,
+ const GURL& origin,
+ int64 service_worker_registration_id,
+ const std::string& data,
+ const base::Callback<void(PushMessagingStatus)>& callback);
+
// Ensures that the corresponding ResourceContext is initialized. Normally the
// BrowserContext initializs the corresponding getters when its objects are
// created, but if the embedder wants to pass the ResourceContext to another
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/common/push_messaging_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698