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 0af23c1239af8a3cf3429ed00250c51ddd63d4be..727533b02822b41a45d99e23e7b05dcbedf91e4b 100644 |
| --- a/content/browser/service_worker/service_worker_provider_host.h |
| +++ b/content/browser/service_worker/service_worker_provider_host.h |
| @@ -51,13 +51,15 @@ class CONTENT_EXPORT ServiceWorkerProviderHost |
| using GetRegistrationForReadyCallback = |
| base::Callback<void(ServiceWorkerRegistration* reigstration)>; |
| - // If |render_frame_id| is MSG_ROUTING_NONE, this provider host works for the |
| - // worker context, i.e. ServiceWorker or SharedWorker. |
| + // When this provider host is for a Service Worker context, |route_id| is |
| + // MSG_ROUTING_NONE, Whent this provider host is for a Document, |
|
nhiroki
2015/06/12 05:48:02
", Whent" -> ". When"
(comma) -> (dot)
horo
2015/06/12 08:45:43
Done.
|
| + // |route_id| is the frame ID of the Document. When this provider host is for |
| + // a Shared Worker, |route_id| is the Shared Worker route ID. |
| // |provider_type| gives additional information whether the provider is |
| // created for controller (ServiceWorker) or controllee (Document or |
| // SharedWorker). |
| ServiceWorkerProviderHost(int render_process_id, |
| - int render_frame_id, |
| + int route_id, |
| int provider_id, |
| ServiceWorkerProviderType provider_type, |
| base::WeakPtr<ServiceWorkerContextCore> context, |
| @@ -67,7 +69,8 @@ class CONTENT_EXPORT ServiceWorkerProviderHost |
| const std::string& client_uuid() const { return client_uuid_; } |
| int process_id() const { return render_process_id_; } |
| int provider_id() const { return provider_id_; } |
| - int frame_id() const { return render_frame_id_; } |
| + int frame_id() const; |
| + int shared_worker_route_id() const; |
| bool IsHostToRunningServiceWorker() { |
| return running_hosted_version_.get() != NULL; |
| @@ -159,7 +162,7 @@ class CONTENT_EXPORT ServiceWorkerProviderHost |
| const std::vector<TransferredMessagePort>& sent_message_ports); |
| // Activates the WebContents associated with |
| - // { render_process_id_, render_frame_id_ }. |
| + // { render_process_id_, route_id_ }. |
| // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. |
| void Focus(const GetClientInfoCallback& callback); |
| @@ -170,7 +173,7 @@ class CONTENT_EXPORT ServiceWorkerProviderHost |
| // It is taking the process and frame ids in parameter because |this| is meant |
| // to live on the IO thread. |
| static ServiceWorkerClientInfo GetWindowClientInfoOnUI(int render_process_id, |
| - int render_frame_id); |
| + int route_id); |
| // Adds reference of this host's process to the |pattern|, the reference will |
| // be removed in destructor. |
| @@ -282,7 +285,7 @@ class CONTENT_EXPORT ServiceWorkerProviderHost |
| std::string client_uuid_; |
| int render_process_id_; |
| - int render_frame_id_; |
| + int route_id_; |
| int render_thread_id_; |
| int provider_id_; |
| ServiceWorkerProviderType provider_type_; |