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

Unified Diff: public/platform/WebServiceWorkerRegistrationProxy.h

Issue 473743002: ServiceWorker: register() should return the existing registration object if available (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix Created 6 years, 4 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 | « public/platform/WebServiceWorkerRegistration.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebServiceWorkerRegistrationProxy.h
diff --git a/public/platform/WebServiceWorkerRegistrationProxy.h b/public/platform/WebServiceWorkerRegistrationProxy.h
index 57d1404938faaaaa664fd941fc641a816e82052d..94e5a74c3ca89f72ca92713dff8639adfade2068 100644
--- a/public/platform/WebServiceWorkerRegistrationProxy.h
+++ b/public/platform/WebServiceWorkerRegistrationProxy.h
@@ -5,8 +5,11 @@
#ifndef WebServiceWorkerRegistrationProxy_h
#define WebServiceWorkerRegistrationProxy_h
+#include "public/platform/WebCommon.h"
+
namespace blink {
+class ServiceWorkerRegistration;
class WebServiceWorker;
// A proxy interface, passed via WebServiceWorkerRegistration.setProxy() from
@@ -14,7 +17,7 @@ class WebServiceWorker;
// embedder.
class WebServiceWorkerRegistrationProxy {
public:
- WebServiceWorkerRegistrationProxy() { }
+ WebServiceWorkerRegistrationProxy() : m_private(0) { }
virtual ~WebServiceWorkerRegistrationProxy() { }
// Notifies that the registration entered the installation process.
@@ -25,6 +28,14 @@ public:
virtual void setInstalling(WebServiceWorker*) = 0;
virtual void setWaiting(WebServiceWorker*) = 0;
virtual void setActive(WebServiceWorker*) = 0;
+
+#if INSIDE_BLINK
+ BLINK_PLATFORM_EXPORT WebServiceWorkerRegistrationProxy(ServiceWorkerRegistration*);
+ BLINK_PLATFORM_EXPORT operator ServiceWorkerRegistration*() const;
+#endif
+
+protected:
+ ServiceWorkerRegistration* m_private;
sof 2014/08/14 08:59:49 This is a GCed object; can you guarantee that the
nhiroki 2014/08/15 00:05:54 Thank you for pointing out! I think our subsequent
};
} // namespace blink
« no previous file with comments | « public/platform/WebServiceWorkerRegistration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698