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

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

Issue 251653003: Introduces DevToolsManagerDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/browser/service_worker/service_worker_context_wrapper.h
diff --git a/content/browser/service_worker/service_worker_context_wrapper.h b/content/browser/service_worker/service_worker_context_wrapper.h
index bd83210679bad8f0421b844caf46995e6f4365bb..3396fedc88c430cdaffc09dc19b1ce655ae2e183 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.h
+++ b/content/browser/service_worker/service_worker_context_wrapper.h
@@ -11,6 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/service_worker/service_worker_context_core.h"
+#include "content/browser/service_worker/service_worker_context_observer.h"
#include "content/common/content_export.h"
#include "content/public/browser/service_worker_context.h"
@@ -34,6 +35,7 @@ class ServiceWorkerContextObserver;
// is what is used internally in the service worker lib.
class CONTENT_EXPORT ServiceWorkerContextWrapper
: NON_EXPORTED_BASE(public ServiceWorkerContext),
+ public ServiceWorkerContextObserver,
public base::RefCountedThreadSafe<ServiceWorkerContextWrapper> {
public:
ServiceWorkerContextWrapper(BrowserContext* browser_context);
@@ -57,6 +59,20 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
const ResultCallback& continuation)
OVERRIDE;
+ virtual void AddStatusChangeCallback(
+ const base::Callback<void(void)>& callback) OVERRIDE;
+
+ virtual void RemoveStatusChangeCallback(
+ const base::Callback<void(void)>& callback) OVERRIDE;
+
+ virtual void GetRunningServiceWorkerInfo(
+ const GetRunningServiceWorkerInfoCallback& callback) OVERRIDE;
+
+ // ServiceWorkerContextObserver
michaeln 2014/05/01 02:52:07 can these go in the private section since it's rea
horo 2014/05/01 04:52:32 Done.
+ virtual void OnWorkerStarted(int64 version_id, int process_id, int thread_id);
+ virtual void OnWorkerStopped(int64 version_id, int process_id, int thread_id);
+ virtual void OnVersionStateChanged(int64 version_id);
+
void AddObserver(ServiceWorkerContextObserver* observer);
void RemoveObserver(ServiceWorkerContextObserver* observer);
@@ -65,11 +81,14 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
friend class ServiceWorkerProcessManager;
virtual ~ServiceWorkerContextWrapper();
+ void CallStatusChangeCallback();
+
const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> >
observer_list_;
// Cleared in Shutdown():
BrowserContext* browser_context_;
scoped_ptr<ServiceWorkerContextCore> context_core_;
+ std::vector<base::Callback<void(void)> > status_change_callbacks_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698