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

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

Issue 304543002: Show the unregistered workers in chrome://serviceworker-internals and chrome://inspect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass live_registrations to chrome://inspect. 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
Index: content/browser/service_worker/service_worker_internals_ui.h
diff --git a/content/browser/service_worker/service_worker_internals_ui.h b/content/browser/service_worker/service_worker_internals_ui.h
index c3f806dc768d733569efb7abdae2ff14b37f8b2e..c4ca45bae1ba27e010a36824c083b9d3b2da24a8 100644
--- a/content/browser/service_worker/service_worker_internals_ui.h
+++ b/content/browser/service_worker/service_worker_internals_ui.h
@@ -38,6 +38,10 @@ class ServiceWorkerInternalsUI
class OperationProxy;
class PartitionObserver;
+ typedef base::Callback<void(ServiceWorkerStatusCode)> StatusCallback;
+ typedef void (ServiceWorkerVersion::*ServiceWorkerVersionMethod)(
+ const StatusCallback& callback);
+
virtual ~ServiceWorkerInternalsUI();
void AddContextFromStoragePartition(StoragePartition* partition);
@@ -45,17 +49,18 @@ class ServiceWorkerInternalsUI
// Called from Javascript.
void GetAllRegistrations(const base::ListValue* args);
- void StartWorker(const base::ListValue* args);
- void StopWorker(const base::ListValue* args);
- void DispatchSyncEventToWorker(const base::ListValue* args);
+ void CallServiceWorkerVersionMethod(ServiceWorkerVersionMethod method,
+ const base::ListValue* args);
void InspectWorker(const base::ListValue* args);
void Unregister(const base::ListValue* args);
+ void StartWorker(const base::ListValue* args);
- bool GetRegistrationInfo(
- const base::ListValue* args,
- base::FilePath* partition_path,
- GURL* scope,
+ bool GetServiceWorkerContext(
+ int partition_id,
scoped_refptr<ServiceWorkerContextWrapper>* context) const;
+ void FindContext(int partition_id,
+ StoragePartition** result_partition,
+ StoragePartition* storage_partition) const;
base::ScopedPtrHashMap<uintptr_t, PartitionObserver> observers_;
int next_partition_id_;

Powered by Google App Engine
This is Rietveld 408576698