Chromium Code Reviews| 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 ecffaca878c414174b0822effb9f8cd1e1c12c04..72120ce81bb213dcb6b059d7ea6f7467f9f84d4c 100644 |
| --- a/content/browser/service_worker/service_worker_context_core.h |
| +++ b/content/browser/service_worker/service_worker_context_core.h |
| @@ -9,6 +9,7 @@ |
| #include <vector> |
| #include "base/callback.h" |
| +#include "base/containers/scoped_ptr_hash_map.h" |
| #include "base/files/file_path.h" |
| #include "base/id_map.h" |
| #include "base/memory/scoped_ptr.h" |
| @@ -65,6 +66,9 @@ class CONTENT_EXPORT ServiceWorkerContextCore |
| using ProviderByClientUUIDMap = |
| std::map<std::string, ServiceWorkerProviderHost*>; |
| + using ProviderByStreamURLMap = |
| + base::ScopedPtrHashMap<std::string, |
| + scoped_ptr<ServiceWorkerProviderHost>>; |
| // Directory for ServiceWorkerStorage and ServiceWorkerCacheManager. |
| static const base::FilePath::CharType kServiceWorkerDirectory[]; |
| @@ -156,6 +160,15 @@ class CONTENT_EXPORT ServiceWorkerContextCore |
| scoped_ptr<ProviderHostIterator> GetClientProviderHostIterator( |
| const GURL& origin); |
| + // PlzNavigate: |
| + // Creates a new ProviderHost for browser side navitgation. |
| + scoped_ptr<ServiceWorkerProviderHost> CreateNavigationProviderHost(); |
| + void RegisterNavigationProviderHost( |
| + const GURL& response_stream_url, |
|
michaeln
2015/07/24 22:22:26
This tripped me up a little, at first glance i tho
horo
2015/07/27 09:11:17
Removed this argument.
|
| + scoped_ptr<ServiceWorkerProviderHost> provider_host); |
| + scoped_ptr<ServiceWorkerProviderHost> TakeNavigationProviderHost( |
| + const GURL& response_stream_url); |
| + |
| // Maintains a map from Client UUID to ProviderHost. |
| // (Note: instead of maintaining 2 maps we might be able to uniformly use |
| // UUID instead of process_id+provider_id elsewhere. For now I'm leaving |
| @@ -267,8 +280,11 @@ class CONTENT_EXPORT ServiceWorkerContextCore |
| std::map<int64, ServiceWorkerRegistration*> live_registrations_; |
| std::map<int64, ServiceWorkerVersion*> live_versions_; |
| std::map<int64, scoped_refptr<ServiceWorkerVersion>> protected_versions_; |
| + |
| + ProviderByStreamURLMap navigation_provider_host_map_; |
| int next_handle_id_; |
| int next_registration_handle_id_; |
| + int next_navigation_provider_host_id_; |
| scoped_refptr<base::ObserverListThreadSafe<ServiceWorkerContextObserver>> |
| observer_list_; |
| base::WeakPtrFactory<ServiceWorkerContextCore> weak_factory_; |