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

Unified Diff: content/public/browser/service_worker_context.h

Issue 251653003: Introduces DevToolsManagerDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename worker_route_id to worker_devtools_agent_route_id Created 6 years, 8 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/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() {}

Powered by Google App Engine
This is Rietveld 408576698