| 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 75d9a5445d24ef1183af5e1cdaec49119810eb03..59443420fdb5e52ce8d5a5ac9a4710a5ef93ebe6 100644
|
| --- a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| +++ b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| @@ -152,13 +152,23 @@ void ServiceWorkerGlobalScopeProxy::dispatchNotificationClickEvent(int eventID,
|
| {
|
| WaitUntilObserver* observer = WaitUntilObserver::create(workerGlobalScope(), WaitUntilObserver::NotificationClick, eventID);
|
| NotificationEventInit eventInit;
|
| - eventInit.setNotification(Notification::create(workerGlobalScope(), notificationID, data));
|
| + eventInit.setNotification(Notification::create(workerGlobalScope(), notificationID, data, true /* showing */));
|
| if (0 <= actionIndex && actionIndex < static_cast<int>(data.actions.size()))
|
| eventInit.setAction(data.actions[actionIndex].action);
|
| RefPtrWillBeRawPtr<Event> event(NotificationEvent::create(EventTypeNames::notificationclick, eventInit, observer));
|
| 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.setAction(WTF::String()); // initialize as null.
|
| + eventInit.setNotification(Notification::create(workerGlobalScope(), notificationID, data, false /* showing */));
|
| + RefPtrWillBeRawPtr<Event> event(NotificationEvent::create(EventTypeNames::notificationclose, eventInit, observer));
|
| + workerGlobalScope()->dispatchExtendableEvent(event.release(), observer);
|
| +}
|
| +
|
| void ServiceWorkerGlobalScopeProxy::dispatchPushEvent(int eventID, const WebString& data)
|
| {
|
| WaitUntilObserver* observer = WaitUntilObserver::create(workerGlobalScope(), WaitUntilObserver::Push, eventID);
|
|
|