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

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

Issue 265943003: Add blink-side binding code for navigator.serviceWorker.current (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased cached properties access tests 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
Index: Source/modules/serviceworkers/ServiceWorkerContainer.h
diff --git a/Source/modules/serviceworkers/ServiceWorkerContainer.h b/Source/modules/serviceworkers/ServiceWorkerContainer.h
index 31cddf641efdd610e7755af113afa5c09a6e2083..19612b22f6e71420a36504c0e4c0aca73ec3a04f 100644
--- a/Source/modules/serviceworkers/ServiceWorkerContainer.h
+++ b/Source/modules/serviceworkers/ServiceWorkerContainer.h
@@ -35,6 +35,7 @@
#include "bindings/v8/ScriptWrappable.h"
#include "core/dom/ContextLifecycleObserver.h"
#include "core/frame/DOMWindowLifecycleObserver.h"
+#include "modules/serviceworkers/ServiceWorker.h"
#include "public/platform/WebServiceWorkerProviderClient.h"
#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
@@ -66,6 +67,8 @@ public:
ScriptPromise registerServiceWorker(ExecutionContext*, const String& pattern, const Dictionary&);
ScriptPromise unregisterServiceWorker(ExecutionContext*, const String& scope = String());
+ PassRefPtr<ServiceWorker> current() { return m_current; }
+
// WebServiceWorkerProviderClient overrides.
virtual void setCurrentServiceWorker(blink::WebServiceWorker*) OVERRIDE;
virtual void dispatchMessageEvent(const blink::WebString& message, const blink::WebMessagePortChannelArray&) OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698