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

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

Issue 811793002: ServiceWorker: Expose registration within ServiceWorkerGlobalScope [1/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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/ServiceWorkerGlobalScope.h
diff --git a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
index 3eb68469121ee6477880cd91f67773af0eca6fec..f077fc4b6b9aa79bf9371fcc5e1414c86093d3e8 100644
--- a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
+++ b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
@@ -45,8 +45,10 @@ class Request;
class ScriptPromise;
class ScriptState;
class ServiceWorkerClients;
+class ServiceWorkerRegistration;
class ServiceWorkerThread;
class WaitUntilObserver;
+class WebServiceWorkerRegistration;
class WorkerThreadStartupData;
typedef RequestOrUSVString RequestInfo;
@@ -64,6 +66,7 @@ public:
// ServiceWorkerGlobalScope.idl
ServiceWorkerClients* clients();
+ ServiceWorkerRegistration* registration();
CacheStorage* caches(ExecutionContext*);
@@ -73,6 +76,8 @@ public:
ScriptPromise skipWaiting(ScriptState*);
+ void setRegistration(WebServiceWorkerRegistration*);
+
// EventTarget
virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture = false) override;
virtual const AtomicString& interfaceName() const override;
@@ -96,6 +101,7 @@ private:
virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack>) override;
PersistentWillBeMember<ServiceWorkerClients> m_clients;
+ PersistentWillBeMember<ServiceWorkerRegistration> m_registration;
PersistentWillBeMember<CacheStorage> m_caches;
bool m_didEvaluateScript;
bool m_hadErrorInTopLevelEventHandler;

Powered by Google App Engine
This is Rietveld 408576698