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

Unified Diff: Source/modules/serviceworkers/NavigatorServiceWorker.h

Issue 26078002: Rename WebServiceWorkerRegistry to WebServiceWorkerProvider (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add logging error handler Created 7 years, 2 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
Index: Source/modules/serviceworkers/NavigatorServiceWorker.h
diff --git a/Source/modules/serviceworkers/NavigatorServiceWorker.h b/Source/modules/serviceworkers/NavigatorServiceWorker.h
index ef60deecfaa2d63c1ce199f79b796da13aec2fb6..bbd19c0fc5fc6a3683e53dfef6457b2b4d607f06 100644
--- a/Source/modules/serviceworkers/NavigatorServiceWorker.h
+++ b/Source/modules/serviceworkers/NavigatorServiceWorker.h
@@ -34,13 +34,19 @@
#include "bindings/v8/ScriptPromise.h"
#include "core/page/Navigator.h"
#include "platform/Supplementable.h"
+#include "public/platform/WebServiceWorkerProviderClient.h"
+
+namespace WebKit {
+class WebServiceWorkerProvider;
+class WebString;
+}
namespace WebCore {
class ExceptionState;
class Navigator;
-class NavigatorServiceWorker : public Supplement<Navigator> {
+class NavigatorServiceWorker : public Supplement<Navigator>, public WebKit::WebServiceWorkerProviderClient {
public:
virtual ~NavigatorServiceWorker();
static NavigatorServiceWorker* from(Navigator*);
@@ -49,15 +55,21 @@ public:
static ScriptPromise registerServiceWorker(ScriptExecutionContext*, Navigator*, const String& pattern, const String& src, ExceptionState&);
static ScriptPromise unregisterServiceWorker(ScriptExecutionContext*, Navigator*, const String& pattern, ExceptionState&);
+ // WebServiceWorkerProviderClient implementation
+ virtual void didFailToStart(const WebKit::WebString& message) OVERRIDE;
+
private:
ScriptPromise registerServiceWorker(ScriptExecutionContext*, const String& pattern, const String& src, ExceptionState&);
ScriptPromise unregisterServiceWorker(ScriptExecutionContext*, const String& pattern, ExceptionState&);
explicit NavigatorServiceWorker(Navigator*);
+ WebKit::WebServiceWorkerProvider* serviceWorkerProvider();
+
static const char* supplementName();
Navigator* m_navigator;
+ OwnPtr<WebKit::WebServiceWorkerProvider> m_provider;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698