Index: content/child/blink_platform_impl.cc |
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc |
index 84beac0dd6f0f1721dc67d0204539da9246c54be..7d7d997d2e67a87cb718f55737f1bf74509665c1 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_socket_stream_handle_impl.h" |
@@ -427,6 +430,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(); |
} |
} |
@@ -1025,6 +1031,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(), |
Mike West
2014/10/24 13:20:18
Do you need to store the ThreadSafeSender and Noti
Peter Beverloo
2014/10/24 13:57:35
ChildThread::current() is stored in a TLS and is n
|
+ notification_dispatcher_.get()); |
+} |
+ |
WebThemeEngine* BlinkPlatformImpl::themeEngine() { |
return &native_theme_engine_; |
} |