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

Unified Diff: Source/web/SharedWorkerRepositoryClientImpl.h

Issue 40143003: Simplify SharedWorkerRepository code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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
« no previous file with comments | « Source/web/SharedWorkerRepository.cpp ('k') | Source/web/SharedWorkerRepositoryClientImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/web/SharedWorkerRepository.cpp ('k') | Source/web/SharedWorkerRepositoryClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698