| Index: Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| diff --git a/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| index 7ec351264510c662e970a194a3fbe2fe85e73683..fd82f64a5bb4826290eb89e8ebadd72f7e368e3b 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/NotificationEvent.h"
|
| #include "modules/push_messaging/PushEvent.h"
|
| #include "modules/serviceworkers/ExtendableEvent.h"
|
| #include "modules/serviceworkers/FetchEvent.h"
|
| @@ -48,6 +49,7 @@
|
| #include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
|
| #include "modules/serviceworkers/WaitUntilObserver.h"
|
| #include "platform/RuntimeEnabledFeatures.h"
|
| +#include "public/platform/WebNotificationData.h"
|
| #include "public/platform/WebServiceWorkerEventResult.h"
|
| #include "public/platform/WebServiceWorkerRequest.h"
|
| #include "public/web/WebSerializedScriptValue.h"
|
| @@ -125,6 +127,26 @@ void ServiceWorkerGlobalScopeProxy::dispatchPushEvent(int eventID, const WebStri
|
| ServiceWorkerGlobalScopeClient::from(m_workerGlobalScope)->didHandlePushEvent(eventID, WebServiceWorkerEventResultCompleted);
|
| }
|
|
|
| +void ServiceWorkerGlobalScopeProxy::dispatchNotificationClickEvent(int eventID, const WebNotificationData& data)
|
| +{
|
| + ASSERT(m_workerGlobalScope);
|
| + WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope, WaitUntilObserver::NotificationClick, eventID);
|
| + // FIXME: Initialize a Notification object based on |data|.
|
| + NotificationEventInit eventInit;
|
| + RefPtrWillBeRawPtr<Event> event(NotificationEvent::create(EventTypeNames::notificationclick, eventInit, observer));
|
| + m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer);
|
| +}
|
| +
|
| +void ServiceWorkerGlobalScopeProxy::dispatchNotificationErrorEvent(int eventID, const WebNotificationData& data)
|
| +{
|
| + ASSERT(m_workerGlobalScope);
|
| + WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope, WaitUntilObserver::NotificationError, eventID);
|
| + // FIXME: Initialize a Notification object based on |data|.
|
| + NotificationEventInit eventInit;
|
| + RefPtrWillBeRawPtr<Event> event(NotificationEvent::create(EventTypeNames::notificationerror, eventInit, observer));
|
| + m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer);
|
| +}
|
| +
|
| void ServiceWorkerGlobalScopeProxy::dispatchSyncEvent(int eventID)
|
| {
|
| ASSERT(m_workerGlobalScope);
|
|
|