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

Unified Diff: content/child/service_worker/service_worker_network_provider.h

Issue 261533003: Populate .current when navigator.serviceWorker is accessed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/child/service_worker/service_worker_network_provider.h
diff --git a/content/child/service_worker/service_worker_network_provider.h b/content/child/service_worker/service_worker_network_provider.h
index 400918f969d96ea9c7050eb9f03ee94a8e215527..0d6f494421ece7d2185fa028fa3da0cd117b348c 100644
--- a/content/child/service_worker/service_worker_network_provider.h
+++ b/content/child/service_worker/service_worker_network_provider.h
@@ -6,12 +6,15 @@
#define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_NETWORK_PROVIDER_IMPL_H_
#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/supports_user_data.h"
#include "content/common/content_export.h"
namespace content {
+class ServiceWorkerProviderContext;
+
// A unique provider_id is generated for each instance.
// Instantiated prior to the main resource load being started and remains
// allocated until after the last subresource load has occurred.
@@ -37,6 +40,7 @@ class CONTENT_EXPORT ServiceWorkerNetworkProvider
virtual ~ServiceWorkerNetworkProvider();
int provider_id() const { return provider_id_; }
+ ServiceWorkerProviderContext* context() { return context_.get(); }
// This method is called for a provider that's associated with a
// running service worker script. The version_id indicates which
@@ -45,6 +49,7 @@ class CONTENT_EXPORT ServiceWorkerNetworkProvider
private:
const int provider_id_;
+ scoped_refptr<ServiceWorkerProviderContext> context_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerNetworkProvider);
};

Powered by Google App Engine
This is Rietveld 408576698