#ifndef ServiceWorkerContainerClient_h
#define ServiceWorkerContainerClient_h
#include "core/dom/DocumentSupplementable.h"
#include "core/workers/WorkerClients.h"
#include "wtf/Forward.h"
namespace blink {
class WebServiceWorkerProvider;
}
namespace WebCore {
class ExecutionContext;
class ServiceWorkerContainerClient FINAL :
public DocumentSupplement,
public Supplement<WorkerClients> {
WTF_MAKE_NONCOPYABLE(ServiceWorkerContainerClient);
public:
static PassOwnPtr<ServiceWorkerContainerClient> create(PassOwnPtr<blink::WebServiceWorkerProvider>);
virtual ~ServiceWorkerContainerClient();
blink::WebServiceWorkerProvider* provider() { return m_provider.get(); }
static const char* supplementName();
static ServiceWorkerContainerClient* from(ExecutionContext*);
protected:
explicit ServiceWorkerContainerClient(PassOwnPtr<blink::WebServiceWorkerProvider>);
OwnPtr<blink::WebServiceWorkerProvider> m_provider;
};
void provideServiceWorkerContainerClientToWorker(WorkerClients*, PassOwnPtr<blink::WebServiceWorkerProvider>);
}
#endif