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

Unified Diff: content/browser/service_worker/service_worker_context_core.h

Issue 1399363004: PlzNavigate: Make ServiceWorker work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: content/browser/service_worker/service_worker_context_core.h
diff --git a/content/browser/service_worker/service_worker_context_core.h b/content/browser/service_worker/service_worker_context_core.h
index 42e25b75e7dbedceda51c7bcc5321fe3eb42d55c..fb89c0de8a128f1d295e9c39d6417cec860e9f07 100644
--- a/content/browser/service_worker/service_worker_context_core.h
+++ b/content/browser/service_worker/service_worker_context_core.h
@@ -42,6 +42,7 @@ class ServiceWorkerContextWrapper;
class ServiceWorkerDatabaseTaskManager;
class ServiceWorkerHandle;
class ServiceWorkerJobCoordinator;
+class ServiceWorkerNavigationHandleCore;
class ServiceWorkerProviderHost;
class ServiceWorkerRegistration;
class ServiceWorkerStorage;
@@ -219,6 +220,14 @@ class CONTENT_EXPORT ServiceWorkerContextCore
return live_versions_;
}
+ // PlzNavigate
+ // Returns the map keeping track of all ServiceWorkerNavigationHandleCores
+ // registered for ongoing navigations.
+ std::map<int, ServiceWorkerNavigationHandleCore*>&
+ GetNavigationHandleCores() {
+ return navigation_handle_cores_map_;
+ }
+
std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo();
std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo();
@@ -294,6 +303,12 @@ class CONTENT_EXPORT ServiceWorkerContextCore
std::map<int64, ServiceWorkerRegistration*> live_registrations_;
std::map<int64, ServiceWorkerVersion*> live_versions_;
std::map<int64, scoped_refptr<ServiceWorkerVersion>> protected_versions_;
+
+ // PlzNavigate
+ // Map of ServiceWorkerNavigationHandleCores used for navigation requests.
+ std::map<int, ServiceWorkerNavigationHandleCore*>
+ navigation_handle_cores_map_;
+
int next_handle_id_;
int next_registration_handle_id_;
// Set in RegisterServiceWorker(), cleared in ClearAllServiceWorkersForTest().

Powered by Google App Engine
This is Rietveld 408576698