Index: content/browser/service_worker/service_worker_client_utils.h |
diff --git a/content/browser/service_worker/service_worker_client_utils.h b/content/browser/service_worker/service_worker_client_utils.h |
index 258268e1e0d2cbe93c698a3970add5fddb7fd2a8..05659d95d0ad7e32c913e8835323595fe2efd018 100644 |
--- a/content/browser/service_worker/service_worker_client_utils.h |
+++ b/content/browser/service_worker/service_worker_client_utils.h |
@@ -27,6 +27,7 @@ using NavigationCallback = |
base::Callback<void(ServiceWorkerStatusCode status, |
const std::string& client_uuid, |
const ServiceWorkerClientInfo& client_info)>; |
+using ClientCallback = base::Callback<void(const ServiceWorkerClientInfo&)>; |
using ServiceWorkerClients = std::vector<ServiceWorkerClientInfo>; |
using ClientsCallback = base::Callback<void(ServiceWorkerClients* clients)>; |
@@ -47,6 +48,13 @@ void NavigateClient(const GURL& url, |
const base::WeakPtr<ServiceWorkerContextCore>& context, |
const NavigationCallback& callback); |
+// Gets a client matched by |id|. |callback| is called with the client |
+// information on completion. |
+void GetClient(const base::WeakPtr<ServiceWorkerVersion>& controller, |
+ const std::string& id, |
nhiroki
2016/02/03 09:39:59
I'd prefer "client_uuid" to "id" because this clas
jungkees
2016/02/03 14:15:07
Agreed. Addressed.
|
+ const base::WeakPtr<ServiceWorkerContextCore>& context, |
+ const ClientCallback& callback); |
+ |
// Collects clients matched with |options|. |callback| is called with the client |
// information sorted in MRU order (most recently focused order) on completion. |
void GetClients(const base::WeakPtr<ServiceWorkerVersion>& controller, |