Index: content/browser/service_worker/service_worker_provider_host.h |
diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h |
index 585bc591b6ffc705fd4da1733201cb3391e6e761..ccf36720e8b6e825596e9f941bffb4e3c07c41f5 100644 |
--- a/content/browser/service_worker/service_worker_provider_host.h |
+++ b/content/browser/service_worker/service_worker_provider_host.h |
@@ -12,6 +12,7 @@ |
#include <memory> |
#include <set> |
#include <string> |
+#include <unordered_map> |
#include <vector> |
#include "base/gtest_prod_util.h" |
@@ -22,6 +23,7 @@ |
#include "content/common/content_export.h" |
#include "content/common/service_worker/service_worker_provider_host_info.h" |
#include "content/common/service_worker/service_worker_types.h" |
+#include "content/common/worker_url_loader_factory_provider.mojom.h" |
#include "content/public/common/request_context_frame_type.h" |
#include "content/public/common/request_context_type.h" |
#include "content/public/common/resource_type.h" |
@@ -285,6 +287,12 @@ class CONTENT_EXPORT ServiceWorkerProviderHost |
// cache. |
void NotifyControllerLost(); |
+ // Binds the ServiceWorkerWorkerClient of a dedicated (or shared) worker to |
+ // the parent frame's ServiceWorkerProviderHost. (This is used only when |
+ // off-main-thread-fetch is enabled.) |
+ void BindWorkerFetchContext( |
+ mojom::ServiceWorkerWorkerClientAssociatedPtrInfo client_ptr_info); |
+ |
private: |
friend class ForeignFetchRequestHandlerTest; |
friend class LinkHeaderServiceWorkerTest; |
@@ -361,6 +369,10 @@ class CONTENT_EXPORT ServiceWorkerProviderHost |
int frame_routing_id, |
ServiceWorkerDispatcherHost* dispatcher_host); |
+ // Clears the information of the ServiceWorkerWorkerClient of dedicated (or |
+ // shared) worker, when the connection to the worker is disconnected. |
+ void UnregisterWorkerFetchContext(mojom::ServiceWorkerWorkerClient*); |
+ |
std::string client_uuid_; |
int render_process_id_; |
@@ -406,6 +418,10 @@ class CONTENT_EXPORT ServiceWorkerProviderHost |
std::vector<base::Closure> queued_events_; |
+ std::unordered_map<mojom::ServiceWorkerWorkerClient*, |
kinuko
2017/04/18 08:00:31
Can we have comments about this?
horo
2017/04/18 12:53:34
Done.
|
+ mojom::ServiceWorkerWorkerClientAssociatedPtr> |
+ worker_clients_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
}; |