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

Unified Diff: public/platform/WebServiceWorkerProxy.h

Issue 306133002: WebServiceWorkerProxy instances can be unwrapped to ServiceWorkers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Crib from WebNode: make m_private protected to avoid unused field warnings. Created 6 years, 7 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/WebServiceWorker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebServiceWorkerProxy.h
diff --git a/public/platform/WebServiceWorkerProxy.h b/public/platform/WebServiceWorkerProxy.h
index feb6883a3868ad8551526097985f2e33b010783a..9d5230b87cdb6fce0bd2b36a6dc0d42ddb3c213a 100644
--- a/public/platform/WebServiceWorkerProxy.h
+++ b/public/platform/WebServiceWorkerProxy.h
@@ -5,12 +5,19 @@
#ifndef WebServiceWorkerProxy_h
#define WebServiceWorkerProxy_h
+#include "WebCommon.h"
+
+namespace WebCore { class ServiceWorker; }
+
namespace blink {
// A proxy interface, passed via WebServiceWorker.setProxy() from blink to
// the embedder, to talk to the ServiceWorker object from embedder.
class WebServiceWorkerProxy {
public:
+ WebServiceWorkerProxy() : m_private(0) { }
+ virtual ~WebServiceWorkerProxy() { }
+
// Returns true if the proxy is ready to be notified of service worker state
// changes. It may not be if it's waiting for the registration promise to
// resolve, while the browser side has registered and is proceeding to
@@ -20,6 +27,14 @@ public:
// Notifies the proxy that the service worker state changed. The new state
// should be accessible via WebServiceWorker.state().
virtual void dispatchStateChangeEvent() = 0;
+
+#if INSIDE_BLINK
+ BLINK_PLATFORM_EXPORT WebServiceWorkerProxy(WebCore::ServiceWorker*);
+ BLINK_PLATFORM_EXPORT WebCore::ServiceWorker* unwrap() const;
+#endif
+
+protected:
+ WebCore::ServiceWorker* m_private;
};
} // namespace blink
« no previous file with comments | « public/platform/WebServiceWorker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698