Chromium Code Reviews| 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 93ddb411f33f8514a0582da073ef54e86c749c58..7bcf7839b86d84e1699369aabdabc3490a24f87f 100644 |
| --- a/content/browser/service_worker/service_worker_provider_host.h |
| +++ b/content/browser/service_worker/service_worker_provider_host.h |
| @@ -5,6 +5,8 @@ |
| #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| +#include <set> |
| + |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/weak_ptr.h" |
| #include "webkit/common/resource_type.h" |
| @@ -28,12 +30,19 @@ class ServiceWorkerProviderHost |
| int process_id() const { return process_id_; } |
| int provider_id() const { return provider_id_; } |
| + // Adds and removes client thread ID, who is listening events dispatched |
| + // from ServiceWorker to the document corresponding to this provider. |
|
michaeln
2014/03/07 01:33:58
This comment could be massaged to mention the docu
kinuko
2014/03/07 02:02:17
Done.
|
| + void AddScriptClient(int thread_id); |
| + void RemoveScriptClient(int thread_id); |
| + |
| // The service worker version that corresponds with navigator.serviceWorker |
| // for our document. |
| ServiceWorkerVersion* associated_version() const { |
| return associated_version_.get(); |
| } |
| + const std::set<int>& client_thread_ids() const { return client_thread_ids_; } |
|
michaeln
2014/03/06 20:24:29
Shouldn't there only be one script client thread?
kinuko
2014/03/07 00:22:23
In the CL the Add/Remove messages are sent from th
|
| + |
| // Returns true if this provider host should handle requests for |
| // |resource_type|. |
| bool ShouldHandleRequest(ResourceType::Type resource_type) const; |
| @@ -41,6 +50,7 @@ class ServiceWorkerProviderHost |
| private: |
| const int process_id_; |
| const int provider_id_; |
| + std::set<int> client_thread_ids_; |
| scoped_refptr<ServiceWorkerVersion> associated_version_; |
| }; |