Chromium Code Reviews| 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); |