Index: Source/web/SharedWorkerRepositoryClientImpl.h |
diff --git a/Source/modules/serviceworkers/ServiceWorker.h b/Source/web/SharedWorkerRepositoryClientImpl.h |
similarity index 62% |
copy from Source/modules/serviceworkers/ServiceWorker.h |
copy to Source/web/SharedWorkerRepositoryClientImpl.h |
index 068b75757f6e741159fed3e390068c21e527c100..8288ac638202c0d34cced1bdbfd5896cf40ad0cb 100644 |
--- a/Source/modules/serviceworkers/ServiceWorker.h |
+++ b/Source/web/SharedWorkerRepositoryClientImpl.h |
@@ -28,43 +28,37 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef ServiceWorker_h |
-#define ServiceWorker_h |
+#ifndef SharedWorkerRepositoryClientImpl_h |
+#define SharedWorkerRepositoryClientImpl_h |
-#include "public/platform/WebServiceWorker.h" |
-#include "wtf/OwnPtr.h" |
+#include "core/workers/SharedWorkerRepositoryClient.h" |
+#include "wtf/Noncopyable.h" |
#include "wtf/PassOwnPtr.h" |
#include "wtf/PassRefPtr.h" |
-#include "wtf/RefCounted.h" |
namespace WebKit { |
-class WebServiceWorker; |
-} |
-namespace WebCore { |
+class WebSharedWorkerRepositoryClient; |
-class ServiceWorker : public RefCounted<ServiceWorker> { |
+class SharedWorkerRepositoryClientImpl : public WebCore::SharedWorkerRepositoryClient { |
+ WTF_MAKE_NONCOPYABLE(SharedWorkerRepositoryClientImpl); |
public: |
- static PassRefPtr<ServiceWorker> create(PassOwnPtr<WebKit::WebServiceWorker> worker) |
+ static PassOwnPtr<SharedWorkerRepositoryClientImpl> create(WebSharedWorkerRepositoryClient* client) |
{ |
- return adoptRef(new ServiceWorker(worker)); |
+ return adoptPtr(new SharedWorkerRepositoryClientImpl(client)); |
} |
- // For CallbackPromiseAdapter |
- typedef WebKit::WebServiceWorker WebType; |
- static PassRefPtr<ServiceWorker> from(WebType* worker) |
- { |
- return create(adoptPtr(worker)); |
- } |
+ virtual ~SharedWorkerRepositoryClientImpl() { } |
- ~ServiceWorker() { } |
+ virtual void connect(PassRefPtr<WebCore::SharedWorker>, PassRefPtr<WebCore::MessagePortChannel>, const WebCore::KURL&, const String& name, WebCore::ExceptionState&) OVERRIDE; |
+ virtual void documentDetached(WebCore::Document*) OVERRIDE; |
private: |
- explicit ServiceWorker(PassOwnPtr<WebKit::WebServiceWorker>); |
+ explicit SharedWorkerRepositoryClientImpl(WebSharedWorkerRepositoryClient*); |
- OwnPtr<WebKit::WebServiceWorker> m_outerWorker; |
+ WebSharedWorkerRepositoryClient* m_client; |
}; |
-} // namespace WebCore |
+} // namespace WebKit |
-#endif // ServiceWorker_h |
+#endif // SharedWorkerRepositoryClientImpl_h |