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

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

Issue 476043002: ServiceWorker: Make '.ready' return a promise to be resolved with ServiceWorkerRegistration (1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove checkReadyChanged() Created 6 years, 3 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
« no previous file with comments | « no previous file | Source/modules/serviceworkers/ServiceWorkerContainer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/ServiceWorkerContainer.h
diff --git a/Source/modules/serviceworkers/ServiceWorkerContainer.h b/Source/modules/serviceworkers/ServiceWorkerContainer.h
index 69de937e4fa88f972ebf64c366eebc39cc166cdc..ff569f4895da44fed375c3976d892555eaaebfe8 100644
--- a/Source/modules/serviceworkers/ServiceWorkerContainer.h
+++ b/Source/modules/serviceworkers/ServiceWorkerContainer.h
@@ -36,6 +36,7 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/ContextLifecycleObserver.h"
#include "modules/serviceworkers/ServiceWorker.h"
+#include "modules/serviceworkers/ServiceWorkerRegistration.h"
#include "platform/heap/Handle.h"
#include "public/platform/WebServiceWorkerProviderClient.h"
#include "wtf/Forward.h"
@@ -47,9 +48,9 @@ namespace blink {
class Dictionary;
class ExecutionContext;
-class ServiceWorker;
class WebServiceWorker;
class WebServiceWorkerProvider;
+class WebServiceWorkerRegistration;
class ServiceWorkerContainer FINAL
: public RefCountedWillBeGarbageCollectedFinalized<ServiceWorkerContainer>
@@ -80,20 +81,21 @@ public:
virtual void setController(WebServiceWorker*) OVERRIDE;
virtual void setInstalling(WebServiceWorker*) OVERRIDE;
virtual void setWaiting(WebServiceWorker*) OVERRIDE;
+ virtual void setReadyRegistration(WebServiceWorkerRegistration*) OVERRIDE;
virtual void dispatchMessageEvent(const WebString& message, const WebMessagePortChannelArray&) OVERRIDE;
private:
explicit ServiceWorkerContainer(ExecutionContext*);
- typedef ScriptPromiseProperty<RawPtrWillBeMember<ServiceWorkerContainer>, RefPtrWillBeMember<ServiceWorker>, RefPtrWillBeMember<ServiceWorker> > ReadyProperty;
+ typedef ScriptPromiseProperty<RawPtrWillBeMember<ServiceWorkerContainer>, RefPtrWillBeMember<ServiceWorkerRegistration>, RefPtrWillBeMember<ServiceWorkerRegistration> > ReadyProperty;
ReadyProperty* createReadyProperty();
- void checkReadyChanged(PassRefPtrWillBeRawPtr<ServiceWorker> previousReadyWorker);
WebServiceWorkerProvider* m_provider;
RefPtrWillBeMember<ServiceWorker> m_active;
RefPtrWillBeMember<ServiceWorker> m_controller;
RefPtrWillBeMember<ServiceWorker> m_installing;
RefPtrWillBeMember<ServiceWorker> m_waiting;
+ RefPtrWillBeMember<ServiceWorkerRegistration> m_readyRegistration;
tkent 2014/09/05 02:01:25 Please update ServiceWorkerContainer::trace().
nhiroki 2014/09/05 02:23:04 Done. Thanks!
PersistentWillBeMember<ReadyProperty> m_ready;
};
« no previous file with comments | « no previous file | Source/modules/serviceworkers/ServiceWorkerContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698