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

Unified Diff: Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 185423005: Add more plumbing for FetchEvent including WebServiceWorkerResponse (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: BLINK_EXPORT -> BLINK_PLATFORM_EXPORT Created 6 years, 9 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/WebServiceWorkerResponse.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 90713a5e983b3e46c34ce56be22c1ed730e92fcd..80307f05cd84d2b0a73d0826f7182c8fe0e5f898 100644
--- a/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -37,6 +37,7 @@
#include "core/dom/ExecutionContext.h"
#include "core/events/ThreadLocalEventNames.h"
#include "core/workers/WorkerGlobalScope.h"
+#include "modules/serviceworkers/FetchEvent.h"
#include "modules/serviceworkers/InstallEvent.h"
#include "modules/serviceworkers/WaitUntilObserver.h"
#include "platform/NotImplemented.h"
@@ -65,6 +66,14 @@ void ServiceWorkerGlobalScopeProxy::dispatchInstallEvent(int eventID)
observer->didDispatchEvent();
}
+void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID)
+{
+ ASSERT(m_workerGlobalScope);
+ RefPtr<RespondWithObserver> observer = RespondWithObserver::create(m_workerGlobalScope, eventID);
+ m_workerGlobalScope->dispatchEvent(FetchEvent::create(observer));
+ observer->didDispatchEvent();
+}
+
void ServiceWorkerGlobalScopeProxy::reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL)
{
m_client.reportException(errorMessage, lineNumber, columnNumber, sourceURL);
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | public/platform/WebServiceWorkerResponse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698