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

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

Issue 70533005: More scaffolding, add class ServiceWorkerProviderHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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_dispatcher_host.h
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.h b/content/browser/service_worker/service_worker_dispatcher_host.h
index 48a0a58c9958f1c2a39e51cb835d0c176a829c12..9a6c69f4e03dd08535254f06278981257e0e79be 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.h
+++ b/content/browser/service_worker/service_worker_dispatcher_host.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
#include "base/memory/weak_ptr.h"
+#include "content/browser/service_worker/service_worker_provider_host.h"
#include "content/public/browser/browser_message_filter.h"
class GURL;
@@ -14,6 +15,7 @@ namespace content {
class ServiceWorkerContextCore;
class ServiceWorkerContextWrapper;
+class ServiceWorkerProviderHost;
class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
public:
@@ -22,6 +24,7 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
void Init(ServiceWorkerContextWrapper* context_wrapper);
// BrowserIOMessageFilter implementation
+ virtual void OnDestruct() const OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message,
bool* message_was_ok) OVERRIDE;
@@ -29,6 +32,8 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
virtual ~ServiceWorkerDispatcherHost();
private:
+ friend class BrowserThread;
+ friend class base::DeleteHelper<ServiceWorkerDispatcherHost>;
friend class TestingServiceWorkerDispatcherHost;
// IPC Message handlers
@@ -39,8 +44,14 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
void OnUnregisterServiceWorker(int32 thread_id,
int32 request_id,
const GURL& scope);
+ void OnProviderCreated(int provider_id);
+ void OnProviderDestroyed(int provider_id);
+ ServiceWorkerProviderHost* GetProviderHost(int provider_id);
+
+ int render_process_id_;
base::WeakPtr<ServiceWorkerContextCore> context_;
+ ServiceWorkerProviderHostMap providers_;
kinuko 2013/11/18 05:57:24 nit: can you comment this instance owns provider h
michaeln 2013/11/18 20:18:17 Done.
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698