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

Unified Diff: Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 789643003: The Service Worker notificationclick event should carry a notification. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add missing file Created 6 years 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/ServiceWorkerGlobalScopeProxy.cpp
diff --git a/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
index d79a23a7523645bb02b7eca215d0d3a5f4444070..82026d900d0a0e04cd6a7a727dbd3512ab03f470 100644
--- a/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -41,6 +41,7 @@
#include "core/workers/WorkerGlobalScope.h"
#include "modules/geofencing/CircularGeofencingRegion.h"
#include "modules/geofencing/GeofencingEvent.h"
+#include "modules/notifications/Notification.h"
#include "modules/notifications/NotificationEvent.h"
#include "modules/push_messaging/PushEvent.h"
#include "modules/push_messaging/PushMessageData.h"
@@ -125,8 +126,8 @@ void ServiceWorkerGlobalScopeProxy::dispatchNotificationClickEvent(int eventID,
{
ASSERT(m_workerGlobalScope);
WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope, WaitUntilObserver::NotificationClick, eventID);
- // FIXME: Initialize a Notification object based on |notificationID| and |data|.
NotificationEventInit eventInit;
+ eventInit.setNotification(Notification::create(m_workerGlobalScope, notificationID, data));
RefPtrWillBeRawPtr<Event> event(NotificationEvent::create(EventTypeNames::notificationclick, eventInit, observer));
m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer);
}
« Source/modules/notifications/Notification.h ('K') | « Source/modules/notifications/Notification.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698