Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: content/browser/service_worker/service_worker_context_core.cc

Issue 2365053002: Notify ServiceWorkerContextWatcher about routing ids of ServiceWorkerVersion and their updates. (Closed)
Patch Set: rebase, rename Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_context_core.cc
diff --git a/content/browser/service_worker/service_worker_context_core.cc b/content/browser/service_worker/service_worker_context_core.cc
index 457fc13fb6c325d20a5987d4ca5185c95f152f01..55d93d46e84a4443032afb878b5ebf51234c05c7 100644
--- a/content/browser/service_worker/service_worker_context_core.cc
+++ b/content/browser/service_worker/service_worker_context_core.cc
@@ -564,10 +564,10 @@ void ServiceWorkerContextCore::AddLiveVersion(ServiceWorkerVersion* version) {
live_versions_[version->version_id()] = version;
version->AddListener(this);
if (observer_list_.get()) {
+ ServiceWorkerVersionInfo version_info = version->GetInfo();
observer_list_->Notify(FROM_HERE,
&ServiceWorkerContextObserver::OnNewLiveVersion,
- version->version_id(), version->registration_id(),
- version->script_url());
+ version_info);
}
}
@@ -748,6 +748,17 @@ void ServiceWorkerContextCore::OnVersionStateChanged(
version->version_id(), version->status());
}
+void ServiceWorkerContextCore::OnDevToolsRoutingIdChanged(
+ ServiceWorkerVersion* version) {
+ if (!observer_list_ || !version->embedded_worker())
+ return;
+ observer_list_->Notify(
+ FROM_HERE,
+ &ServiceWorkerContextObserver::OnVersionDevToolsRoutingIdChanged,
+ version->version_id(), version->embedded_worker()->process_id(),
+ version->embedded_worker()->worker_devtools_agent_route_id());
+}
+
void ServiceWorkerContextCore::OnMainScriptHttpResponseInfoSet(
ServiceWorkerVersion* version) {
if (!observer_list_)

Powered by Google App Engine
This is Rietveld 408576698