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..358433da75615b85758cbd522bdd645131868e9b 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. When this provider host is for a Document, |
+ // |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 route_id() const { return route_id_; } |
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_; |