summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/public/platform/WebServiceWorkerProvider.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/public/platform/WebServiceWorkerProvider.h')
-rw-r--r--chromium/third_party/WebKit/public/platform/WebServiceWorkerProvider.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/public/platform/WebServiceWorkerProvider.h b/chromium/third_party/WebKit/public/platform/WebServiceWorkerProvider.h
index 73e23635408..7fb36b2844f 100644
--- a/chromium/third_party/WebKit/public/platform/WebServiceWorkerProvider.h
+++ b/chromium/third_party/WebKit/public/platform/WebServiceWorkerProvider.h
@@ -38,15 +38,27 @@ namespace blink {
class WebString;
class WebURL;
class WebServiceWorker;
+class WebServiceWorkerProviderClient;
struct WebServiceWorkerError;
+// Created on the main thread, and may be passed to another script context
+// thread (e.g. worker thread) later. All methods of this class must be called
+// on the single script context thread.
class WebServiceWorkerProvider {
public:
+ // Called when a client wants to start listening to the service worker events. Must be cleared before the client becomes invalid.
+ virtual void setClient(WebServiceWorkerProviderClient*) { }
+
// The WebServiceWorker and WebServiceWorkerError ownership are passed to the WebServiceWorkerCallbacks implementation.
typedef WebCallbacks<WebServiceWorker, WebServiceWorkerError> WebServiceWorkerCallbacks;
virtual void registerServiceWorker(const WebURL& pattern, const WebURL& scriptUrl, WebServiceWorkerCallbacks*) { }
+ // Unregisters the ServiceWorker for a given scope. The provider
+ // must always pass null to onSuccess.
+ // FIXME: "unregister" does not provide a WebServiceWorker, revisit this
+ // to clean up the the callback type to not take a WebServiceWorker*.
virtual void unregisterServiceWorker(const WebURL& pattern, WebServiceWorkerCallbacks*) { }
+
virtual ~WebServiceWorkerProvider() { }
};