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

Unified Diff: content/browser/notifications/platform_notification_context_impl.cc

Issue 1904163002: Move Web Notifications to use Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@skbitmap-blink
Patch Set: resolves the promise Created 4 years, 8 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/notifications/platform_notification_context_impl.cc
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
index 99c9591c1fbbb000f8fd7413b123dc777fc0743f..d4f5ceadbc88fff28678886003e1cd9f19c1dbf7 100644
--- a/content/browser/notifications/platform_notification_context_impl.cc
+++ b/content/browser/notifications/platform_notification_context_impl.cc
@@ -8,6 +8,7 @@
#include "base/files/file_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "content/browser/notifications/blink_notification_service_impl.h"
#include "content/browser/notifications/notification_database.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/public/browser/browser_thread.h"
@@ -99,6 +100,15 @@ void PlatformNotificationContextImpl::ShutdownOnIO() {
service_worker_context_->RemoveObserver(this);
}
+void PlatformNotificationContextImpl::CreateService(
+ mojo::InterfaceRequest<blink::mojom::NotificationService> request) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+ // TODO: This should be initialized (and bound to) the IO thread.
+ // TODO: Probably shouldn't be leaking the memories.
+ new BlinkNotificationServiceImpl(this, std::move(request));
+}
+
void PlatformNotificationContextImpl::ReadNotificationData(
int64_t notification_id,
const GURL& origin,

Powered by Google App Engine
This is Rietveld 408576698