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

Unified Diff: Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 709103002: Allow Blink to respond asynchronously to SW Push events (side 2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/ServiceWorkerGlobalScopeClientImpl.cpp ('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 57a7201183fba015fdaf779cecf4ddcb3d66f8cb..7ec351264510c662e970a194a3fbe2fe85e73683 100644
--- a/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -48,6 +48,7 @@
#include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
#include "modules/serviceworkers/WaitUntilObserver.h"
#include "platform/RuntimeEnabledFeatures.h"
+#include "public/platform/WebServiceWorkerEventResult.h"
#include "public/platform/WebServiceWorkerRequest.h"
#include "public/web/WebSerializedScriptValue.h"
#include "public/web/WebServiceWorkerContextClient.h"
@@ -118,6 +119,10 @@ void ServiceWorkerGlobalScopeProxy::dispatchPushEvent(int eventID, const WebStri
{
ASSERT(m_workerGlobalScope);
m_workerGlobalScope->dispatchEvent(PushEvent::create(EventTypeNames::push, data));
+ // TODO(mvanouwerkerk): Instead of calling didHandlePushEvent here, it
+ // should get called from WaitUntilObserver::decrementPendingActivity once
+ // the push event is hooked up to event.waitUntil (crbug.com/430888).
+ ServiceWorkerGlobalScopeClient::from(m_workerGlobalScope)->didHandlePushEvent(eventID, WebServiceWorkerEventResultCompleted);
}
void ServiceWorkerGlobalScopeProxy::dispatchSyncEvent(int eventID)
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeClientImpl.cpp ('k') | public/web/WebServiceWorkerContextClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698