Index: content/public/browser/service_worker_context.h |
diff --git a/content/public/browser/service_worker_context.h b/content/public/browser/service_worker_context.h |
index 91be6eb3972c7edba4ca85751aa0b2a2fd758452..7b84071dce35a9abaed18e9bd4c27f7b6f431ede 100644 |
--- a/content/public/browser/service_worker_context.h |
+++ b/content/public/browser/service_worker_context.h |
@@ -7,6 +7,7 @@ |
#include "base/basictypes.h" |
#include "base/callback_forward.h" |
+#include "base/callback_list.h" |
#include "url/gurl.h" |
namespace content { |
@@ -52,6 +53,33 @@ class ServiceWorkerContext { |
// TODO(jyasskin): Provide a way to SendMessage to a Scope. |
+ virtual scoped_ptr<base::CallbackList<void(void)>::Subscription> |
+ RegisterStatusChangeCallback( |
+ const base::Callback<void(void)>& callback) = 0; |
+ |
+ class ServiceWorkerInfo { |
+ public: |
+ ServiceWorkerInfo(int worker_process_id, |
+ int embedded_worker_id, |
+ const GURL& scope, |
+ const GURL& url, |
+ int worker_devtools_agent_route_id) |
+ : worker_process_id(worker_process_id), |
+ embedded_worker_id(embedded_worker_id), |
+ scope(scope), |
+ url(url), |
+ worker_devtools_agent_route_id(worker_devtools_agent_route_id) {} |
+ int worker_process_id; |
+ int embedded_worker_id; |
+ GURL scope; |
+ GURL url; |
+ int worker_devtools_agent_route_id; |
+ }; |
+ typedef base::Callback<void(const std::vector< |
+ ServiceWorkerInfo>& registrations)> GetRunningServiceWorkerInfoCallback; |
+ virtual void GetRunningServiceWorkerInfo( |
+ const GetRunningServiceWorkerInfoCallback& callback) = 0; |
+ |
protected: |
ServiceWorkerContext() {} |
virtual ~ServiceWorkerContext() {} |