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

Unified Diff: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 1406823002: Start of foreign fetch implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove blank line Created 5 years, 2 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
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 b0eac25048166a6f8fd985eb8faf036437307aca..2025792cf9edccdd0d8c50d85937f1ea04cff050 100644
--- a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -56,6 +56,7 @@
#include "modules/push_messaging/PushMessageData.h"
#include "modules/serviceworkers/ExtendableEvent.h"
#include "modules/serviceworkers/FetchEvent.h"
+#include "modules/serviceworkers/InstallEvent.h"
#include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
#include "modules/serviceworkers/WaitUntilObserver.h"
#include "platform/RuntimeEnabledFeatures.h"
@@ -122,7 +123,12 @@ void ServiceWorkerGlobalScopeProxy::dispatchInstallEvent(int eventID)
{
ASSERT(m_workerGlobalScope);
WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope, WaitUntilObserver::Install, eventID);
- RefPtrWillBeRawPtr<Event> event(ExtendableEvent::create(EventTypeNames::install, ExtendableEventInit(), observer));
+ RefPtrWillBeRawPtr<Event> event;
+ if (RuntimeEnabledFeatures::foreignFetchEnabled()) {
+ event = InstallEvent::create(EventTypeNames::install, ExtendableEventInit(), observer);
+ } else {
+ event = ExtendableEvent::create(EventTypeNames::install, ExtendableEventInit(), observer);
+ }
m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer);
}

Powered by Google App Engine
This is Rietveld 408576698