Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / public / platform / WebServiceWorkerProviderClient.h
index 5788e09..0214b9d 100644 (file)
 #ifndef WebServiceWorkerProviderClient_h
 #define WebServiceWorkerProviderClient_h
 
-namespace WebKit {
+#include "public/platform/WebMessagePortChannel.h"
+
+namespace blink {
+
+class WebServiceWorker;
+class WebServiceWorkerRegistration;
 class WebString;
 
-// This class catches any errors that may originate on the browser
-// side and not via a DOM API call, such as errors that occur when
-// loading resources through the service worker.
+// This class is the interface for embedders to talk to
+// ServiceWorkerContainer.
 class WebServiceWorkerProviderClient {
 public:
-    // FIXME: replace this general error handler with more specific error handlers.
-    virtual void didFailToStart(const WebString& message) { }
-
     virtual ~WebServiceWorkerProviderClient() { }
-};
 
+    virtual void setController(WebServiceWorker*) = 0;
+    virtual void setReadyRegistration(WebServiceWorkerRegistration*) = 0;
+
+    virtual void dispatchMessageEvent(const WebString& message, const WebMessagePortChannelArray&) = 0;
 };
 
+} // namespace blink
+
 #endif // WebServiceWorkerProviderClient_h