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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 687933002: Move push client to frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. 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
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index b19b1a5a5160d3649668ffcadd2cdcd9c975dbb0..0221d328bfd941fb55a2833954edf7cbd24711f1 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -151,6 +151,7 @@
#include "modules/geolocation/GeolocationController.h"
#include "modules/notifications/NotificationController.h"
#include "modules/notifications/NotificationPermissionClient.h"
+#include "modules/push_messaging/PushController.h"
#include "modules/screen_orientation/ScreenOrientationController.h"
#include "platform/TraceEvent.h"
#include "platform/UserGestureIndicator.h"
@@ -1582,8 +1583,10 @@ void WebLocalFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<LocalFrame> frame)
// FIXME: we shouldn't add overhead to every frame by registering these objects when they're not used.
if (m_frame) {
OwnPtr<NotificationPresenterImpl> notificationPresenter = adoptPtr(new NotificationPresenterImpl());
- if (m_client)
+ if (m_client) {
notificationPresenter->initialize(m_client->notificationPresenter());
+ providePushControllerTo(*m_frame, m_client->pushClient());
Peter Beverloo 2014/10/29 11:25:07 Hmm. The WebPushClient should probably be moved to
Michael van Ouwerkerk 2014/11/11 17:20:06 I don't think that's necessary. It's more complex
+ }
provideNotification(*m_frame, notificationPresenter.release());
provideNotificationPermissionClientTo(*m_frame, NotificationPermissionClientImpl::create());

Powered by Google App Engine
This is Rietveld 408576698