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

Unified Diff: content/browser/browser_context.cc

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 | « chrome/browser/services/gcm/push_messaging_service_impl.cc ('k') | content/browser/push_messaging_router.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index 785a05896cc576eccb23f4c5d88e8284f5ed832a..8acae2d3668221667851988b7371d477bc7a7170 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -9,6 +9,7 @@
#include "content/browser/fileapi/chrome_blob_storage_context.h"
#include "content/browser/indexed_db/indexed_db_context_impl.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
+#include "content/browser/push_messaging_router.h"
#include "content/browser/storage_partition_impl_map.h"
#include "content/common/child_process_host_impl.h"
#include "content/public/browser/blob_handle.h"
@@ -212,6 +213,18 @@ void BrowserContext::CreateMemoryBackedBlob(BrowserContext* browser_context,
callback);
}
+// static
+void BrowserContext::DeliverPushMessage(
+ BrowserContext* browser_context,
+ const GURL& origin,
+ int64 service_worker_registration_id,
+ const std::string& data,
+ const base::Callback<void(PushMessagingStatus)>& callback) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ PushMessagingRouter::DeliverMessage(
+ browser_context, origin, service_worker_registration_id, data, callback);
+}
+
void BrowserContext::EnsureResourceContextInitialized(BrowserContext* context) {
// This will be enough to tickle initialization of BrowserContext if
// necessary, which initializes ResourceContext. The reason we don't call
« no previous file with comments | « chrome/browser/services/gcm/push_messaging_service_impl.cc ('k') | content/browser/push_messaging_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698