Chromium Code Reviews| Index: content/browser/service_worker/service_worker_context_wrapper.cc |
| diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc |
| index fbb00d4fc0fd42a3bd650f6ce2cb7cc28cbcfdd0..518404b71674dbea2665a19fcff99600f0f900e9 100644 |
| --- a/content/browser/service_worker/service_worker_context_wrapper.cc |
| +++ b/content/browser/service_worker/service_worker_context_wrapper.cc |
| @@ -569,6 +569,24 @@ void ServiceWorkerContextWrapper::HasMainFrameProviderHost( |
| context_core_->HasMainFrameProviderHost(origin, callback); |
| } |
| +std::unique_ptr<std::vector<std::pair<int, int>>> |
| +ServiceWorkerContextWrapper::GetProviderHostIds(const GURL& origin) const { |
| + DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| + |
| + std::unique_ptr<std::vector<std::pair<int, int>>> render_frames( |
| + new std::vector<std::pair<int, int>>()); |
| + |
| + for (std::unique_ptr<ServiceWorkerContextCore::ProviderHostIterator> it = |
| + context_core_->GetClientProviderHostIterator(origin); |
| + !it->IsAtEnd(); it->Advance()) { |
| + ServiceWorkerProviderHost* provider_host = it->GetProviderHost(); |
| + render_frames->push_back( |
|
falken
2017/07/05 01:55:05
This isn't necessarily a render_frame. I would cal
gogerald1
2017/07/05 02:26:04
Done.
|
| + std::make_pair(provider_host->process_id(), provider_host->frame_id())); |
| + } |
| + |
| + return render_frames; |
| +} |
| + |
| void ServiceWorkerContextWrapper::FindReadyRegistrationForDocument( |
| const GURL& document_url, |
| const FindRegistrationCallback& callback) { |