#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "content/common/service_worker/service_worker_types.h"
#include "url/gurl.h"
namespace content {
class ThreadSafeSender;
-struct ServiceWorkerObjectInfo;
class ServiceWorkerRegistrationHandleReference {
public:
// Creates a new ServiceWorkerRegistrationHandleReference and increments
// ref-count.
static scoped_ptr<ServiceWorkerRegistrationHandleReference> Create(
- int registration_handle_id,
- const ServiceWorkerObjectInfo& info,
+ const ServiceWorkerRegistrationObjectInfo& info,
ThreadSafeSender* sender);
// Creates a new ServiceWorkerRegistrationHandleReference by adopting a
// ref-count.
static scoped_ptr<ServiceWorkerRegistrationHandleReference> Adopt(
- int registration_handle_id,
- const ServiceWorkerObjectInfo& info,
+ const ServiceWorkerRegistrationObjectInfo& info,
ThreadSafeSender* sender);
~ServiceWorkerRegistrationHandleReference();
- int handle_id() const { return handle_id_; }
- GURL scope() const { return scope_; }
+ const ServiceWorkerRegistrationObjectInfo& info() const { return info_; }
+ int handle_id() const { return info_.handle_id; }
+ GURL scope() const { return info_.scope; }
private:
- ServiceWorkerRegistrationHandleReference(int registration_handle_id,
- const ServiceWorkerObjectInfo& info,
- ThreadSafeSender* sender,
- bool increment_ref_in_ctor);
+ ServiceWorkerRegistrationHandleReference(
+ const ServiceWorkerRegistrationObjectInfo& info,
+ ThreadSafeSender* sender,
+ bool increment_ref_in_ctor);
- const int handle_id_;
- const GURL scope_;
+ ServiceWorkerRegistrationObjectInfo info_;
scoped_refptr<ThreadSafeSender> sender_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistrationHandleReference);