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

Unified Diff: content/child/blink_platform_impl.cc

Issue 644643005: Implement a RenderFrame-less path for Web Notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add OWNERS file Created 6 years, 2 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/child/blink_platform_impl.h ('k') | content/child/child_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index aa62a54ea53551ae329edbf78404d8de1ec68819..79f72adcffcbe5daa58d9d36e8d9587f52cc11ce 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -33,6 +33,9 @@
#include "content/child/child_thread.h"
#include "content/child/content_child_helpers.h"
#include "content/child/geofencing/web_geofencing_provider_impl.h"
+#include "content/child/notifications/notification_dispatcher.h"
+#include "content/child/notifications/notification_manager.h"
+#include "content/child/thread_safe_sender.h"
#include "content/child/web_discardable_memory_impl.h"
#include "content/child/web_gesture_curve_impl.h"
#include "content/child/web_url_loader_impl.h"
@@ -425,6 +428,9 @@ BlinkPlatformImpl::BlinkPlatformImpl()
if (ChildThread::current()) {
geofencing_provider_.reset(new WebGeofencingProviderImpl(
ChildThread::current()->thread_safe_sender()));
+ thread_safe_sender_ = ChildThread::current()->thread_safe_sender();
+ notification_dispatcher_ =
+ ChildThread::current()->notification_dispatcher();
}
}
@@ -1019,6 +1025,16 @@ blink::WebGeofencingProvider* BlinkPlatformImpl::geofencingProvider() {
return geofencing_provider_.get();
}
+blink::WebNotificationManager*
+BlinkPlatformImpl::notificationManager() {
+ if (!thread_safe_sender_.get() || !notification_dispatcher_.get())
+ return nullptr;
+
+ return NotificationManager::ThreadSpecificInstance(
+ thread_safe_sender_.get(),
+ notification_dispatcher_.get());
+}
+
WebThemeEngine* BlinkPlatformImpl::themeEngine() {
return &native_theme_engine_;
}
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/child/child_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698