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

Unified Diff: Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 304053003: ServiceWorker: support Request.{url,method,origin,headers} [blink] (1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 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/platform/WebServiceWorkerRequest.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 efca3f24f7e617003f9dd23d08e1e2c78ae230ab..3dd57a8a8c002a1dc182a33e3050d7ed3756c62b 100644
--- a/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -78,6 +78,7 @@ void ServiceWorkerGlobalScopeProxy::dispatchActivateEvent(int eventID)
observer->didDispatchEvent();
}
+// TODO(horo): Remove this.
void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID)
{
ASSERT(m_workerGlobalScope);
@@ -86,6 +87,15 @@ void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID)
observer->didDispatchEvent();
}
+void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID, const WebServiceWorkerRequest& webRequest)
+{
+ ASSERT(m_workerGlobalScope);
+ RefPtr<RespondWithObserver> observer = RespondWithObserver::create(m_workerGlobalScope, eventID);
+ RefPtr<Request> request = Request::create(webRequest);
+ m_workerGlobalScope->dispatchEvent(FetchEvent::create(observer, request));
+ observer->didDispatchEvent();
+}
+
void ServiceWorkerGlobalScopeProxy::dispatchMessageEvent(const WebString& message, const WebMessagePortChannelArray& webChannels)
{
ASSERT(m_workerGlobalScope);
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | public/platform/WebServiceWorkerRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698