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

Unified Diff: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 1619703002: Implement notificationclose event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed redundant TODO Created 4 years, 11 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: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
diff --git a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
index 53cfd751b51b895f13424a62c68711d1197b145f..3f7c576c52f63e98687a9402068197693acbf688 100644
--- a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -153,6 +153,16 @@ void ServiceWorkerGlobalScopeProxy::dispatchNotificationClickEvent(int eventID,
workerGlobalScope()->dispatchExtendableEvent(event.release(), observer);
}
+void ServiceWorkerGlobalScopeProxy::dispatchNotificationCloseEvent(int eventID, int64_t notificationID, const WebNotificationData& data)
+{
+ WaitUntilObserver* observer = WaitUntilObserver::create(workerGlobalScope(), WaitUntilObserver::NotificationClose, eventID);
+ NotificationEventInit eventInit;
+ eventInit.setNotification(Notification::create(workerGlobalScope(), notificationID, data));
+ RefPtrWillBeRawPtr<Event> event(NotificationEvent::create(EventTypeNames::notificationclose, eventInit, observer));
Peter Beverloo 2016/01/21 14:17:37 Mm. We'll create the notification with |m_state ==
+ workerGlobalScope()->dispatchExtendableEvent(event.release(), observer);
+}
+
+
Peter Beverloo 2016/01/21 14:17:37 micro nit: blank line too much
void ServiceWorkerGlobalScopeProxy::dispatchPushEvent(int eventID, const WebString& data)
{
WaitUntilObserver* observer = WaitUntilObserver::create(workerGlobalScope(), WaitUntilObserver::Push, eventID);

Powered by Google App Engine
This is Rietveld 408576698