Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / child / service_worker / service_worker_network_provider.h
index f4186fe..0d6f494 100644 (file)
@@ -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,9 +40,16 @@ 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
+  // ServiceWorkerVersion should be used.
+  void SetServiceWorkerVersionId(int64 version_id);
 
  private:
   const int provider_id_;
+  scoped_refptr<ServiceWorkerProviderContext> context_;
   DISALLOW_COPY_AND_ASSIGN(ServiceWorkerNetworkProvider);
 };