Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / public / platform / WebServiceWorker.h
index 890bee7..447f120 100644 (file)
 
 #include "WebCommon.h"
 #include "WebMessagePortChannel.h"
+#include "WebServiceWorkerState.h"
+#include "WebString.h"
+#include "WebURL.h"
 #include "WebVector.h"
 
 namespace blink {
 
-class WebString;
+class WebServiceWorkerProxy;
 typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray;
 
 class WebServiceWorker {
 public:
     virtual ~WebServiceWorker() { }
 
+    // Sets ServiceWorkerProxy, with which callee can start making upcalls
+    // to the ServiceWorker object via the client. This doesn't pass the
+    // ownership to the callee, and the proxy's lifetime is same as that of
+    // WebServiceWorker.
+    virtual void setProxy(WebServiceWorkerProxy*) { }
+
+    // Called by this worker's ServiceWorkerProxy when it has become ready or
+    // not ready for state change notifications.
+    virtual void proxyReadyChanged() { }
+
+    virtual WebURL scope() const { return WebURL(); }
+    virtual WebURL url() const { return WebURL(); }
+    virtual WebServiceWorkerState state() const { return WebServiceWorkerStateUnknown; }
+
     // Callee receives ownership of the passed vector.
     // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/351753
     virtual void postMessage(const WebString&, WebMessagePortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); }