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

Unified Diff: Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 1008533005: Initial implementation of stashed message ports, blink side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 7 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
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | public/web/WebServiceWorkerContextClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/ServiceWorkerGlobalScopeProxy.cpp
diff --git a/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
index be40bcbb75ae5e3472a70a11c95b1c3b6878def5..45e2d0aef78196b72fc78abc671f9b2949ba0714 100644
--- a/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -54,6 +54,8 @@
#include "modules/serviceworkers/ServiceWorkerClient.h"
#include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
#include "modules/serviceworkers/ServiceWorkerWindowClient.h"
+#include "modules/serviceworkers/StashedMessagePort.h"
+#include "modules/serviceworkers/StashedPortCollection.h"
#include "modules/serviceworkers/WaitUntilObserver.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "public/platform/WebCrossOriginServiceWorkerClient.h"
@@ -186,6 +188,13 @@ void ServiceWorkerGlobalScopeProxy::dispatchCrossOriginMessageEvent(const WebCro
m_workerGlobalScope->dispatchEvent(event);
}
+void ServiceWorkerGlobalScopeProxy::addStashedMessagePorts(const WebMessagePortChannelArray& webChannels, const WebVector<WebString>& webChannelNames)
+{
+ ASSERT(m_workerGlobalScope);
+ OwnPtrWillBeRawPtr<StashedMessagePortArray> ports = StashedMessagePort::toStashedMessagePortArray(m_workerGlobalScope, webChannels, webChannelNames);
+ m_workerGlobalScope->ports()->addPorts(*ports);
+}
+
void ServiceWorkerGlobalScopeProxy::reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, int)
{
m_client.reportException(errorMessage, lineNumber, columnNumber, sourceURL);
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | public/web/WebServiceWorkerContextClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698