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

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

Issue 224733014: Introduce ServiceWorkerHandle for tracking WebServiceWorkerImpl reference (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_provider_host.h
diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h
index 0aa0cbc20856a44a1ae6326c03074f5bde19b6aa..9ef83ae77d6a75666cc22f5ca8986e187ccdef71 100644
--- a/content/browser/service_worker/service_worker_provider_host.h
+++ b/content/browser/service_worker/service_worker_provider_host.h
@@ -12,9 +12,14 @@
#include "content/common/content_export.h"
#include "webkit/common/resource_type.h"
+namespace ipc {
+class Sender;
+}
+
namespace content {
class ServiceWorkerContextCore;
+class ServiceWorkerDispatcherHost;
class ServiceWorkerVersion;
// This class is the browser-process representation of a serice worker
@@ -27,7 +32,8 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
public:
ServiceWorkerProviderHost(int process_id,
int provider_id,
- base::WeakPtr<ServiceWorkerContextCore> context);
+ base::WeakPtr<ServiceWorkerContextCore> context,
+ ServiceWorkerDispatcherHost* dispatcher_host);
~ServiceWorkerProviderHost();
int process_id() const { return process_id_; }
@@ -57,8 +63,7 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
void AddScriptClient(int thread_id);
void RemoveScriptClient(int thread_id);
- // Associate |version| to this provider as its '.active' or '.pending'
- // version.
+ // Associate |version| to this provider as its '.active' or '.pending'.
// Giving NULL to this method will unset the corresponding field.
void SetActiveVersion(ServiceWorkerVersion* version);
void SetPendingVersion(ServiceWorkerVersion* version);
@@ -80,6 +85,7 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
scoped_refptr<ServiceWorkerVersion> pending_version_;
scoped_refptr<ServiceWorkerVersion> hosted_version_;
base::WeakPtr<ServiceWorkerContextCore> context_;
+ ServiceWorkerDispatcherHost* dispatcher_host_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
};

Powered by Google App Engine
This is Rietveld 408576698