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

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: Addressed comments 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 99b986ca95d139a985aa7f0f458c646a88c37c00..bc4cb16fd429c275cac4d8c419443b00587b149b 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;
@@ -223,6 +224,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_;
+ }
kinuko 2015/10/23 02:37:45 (Personally I prefer providing utility methods ove
clamy 2015/10/27 14:46:13 I changed to utility methods. The code is slightly
+
std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo();
std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo();
@@ -298,6 +307,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