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

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

Issue 288683002: Update chrome://serviceworker-internals when ServiceWorker is unregistered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 7 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
« no previous file with comments | « content/browser/service_worker/service_worker_context_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_internals_ui.cc
diff --git a/content/browser/service_worker/service_worker_internals_ui.cc b/content/browser/service_worker/service_worker_internals_ui.cc
index 9e0ab948477537e0568301bf2a61d751ed4215f6..14003b7a4f953d0c0117061bb68ea1202f40bee0 100644
--- a/content/browser/service_worker/service_worker_internals_ui.cc
+++ b/content/browser/service_worker/service_worker_internals_ui.cc
@@ -157,6 +157,15 @@ class ServiceWorkerInternalsUI::PartitionObserver
web_ui_->CallJavascriptFunction("serviceworker.onConsoleMessageReported",
args.get());
}
+ virtual void OnRegistrationStored(const GURL& pattern) OVERRIDE {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ web_ui_->CallJavascriptFunction("serviceworker.onRegistrationStored",
+ StringValue(pattern.spec()));
+ }
+ virtual void OnRegistrationDeleted(const GURL& pattern) OVERRIDE {
+ web_ui_->CallJavascriptFunction("serviceworker.onRegistrationDeleted",
+ StringValue(pattern.spec()));
+ }
int partition_id() const { return partition_id_; }
private:
@@ -531,7 +540,7 @@ void ServiceWorkerInternalsUI::OperationProxy::OnHaveRegistrations(
result.Append(registration_info);
}
- if (internals_ && !result.empty())
+ if (internals_)
internals_->web_ui()->CallJavascriptFunction(
"serviceworker.onPartitionData",
result,
« no previous file with comments | « content/browser/service_worker/service_worker_context_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698