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 1843b0439852e32aad608e9eac8ee9662132f7ae..75d9a5445d24ef1183af5e1cdaec49119810eb03 100644 |
--- a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp |
+++ b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp |
@@ -54,6 +54,7 @@ |
#include "modules/push_messaging/PushEvent.h" |
#include "modules/push_messaging/PushMessageData.h" |
#include "modules/serviceworkers/ExtendableEvent.h" |
+#include "modules/serviceworkers/ExtendableMessageEvent.h" |
#include "modules/serviceworkers/FetchEvent.h" |
#include "modules/serviceworkers/InstallEvent.h" |
#include "modules/serviceworkers/ServiceWorkerGlobalScope.h" |
@@ -102,6 +103,17 @@ void ServiceWorkerGlobalScopeProxy::dispatchActivateEvent(int eventID) |
workerGlobalScope()->dispatchExtendableEvent(event.release(), observer); |
} |
+void ServiceWorkerGlobalScopeProxy::dispatchExtendableMessageEvent(int eventID, const WebString& message, const WebMessagePortChannelArray& webChannels) |
+{ |
+ ASSERT(RuntimeEnabledFeatures::serviceWorkerExtendableMessageEventEnabled()); |
+ |
+ ExtendableMessageEventInit initializer; |
+ WaitUntilObserver* observer = WaitUntilObserver::create(workerGlobalScope(), WaitUntilObserver::Message, eventID); |
+ |
+ RefPtrWillBeRawPtr<Event> event(ExtendableMessageEvent::create(EventTypeNames::message, initializer, observer)); |
+ workerGlobalScope()->dispatchExtendableEvent(event.release(), observer); |
+} |
+ |
void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID, const WebServiceWorkerRequest& webRequest) |
{ |
dispatchFetchEventImpl(eventID, webRequest, EventTypeNames::fetch); |