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

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

Issue 330173003: Make ServiceWorker an ActiveDOMObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: patch for landing Created 6 years, 6 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/ServiceWorker.h
diff --git a/Source/modules/serviceworkers/ServiceWorker.h b/Source/modules/serviceworkers/ServiceWorker.h
index 58a40ea43e8145cdfe3a95e98223ac0bee06f158..ecd0a1befeab95ac9155f0a5d162efea564d2178 100644
--- a/Source/modules/serviceworkers/ServiceWorker.h
+++ b/Source/modules/serviceworkers/ServiceWorker.h
@@ -77,13 +77,25 @@ public:
private:
class ThenFunction;
+ enum ProxyState {
+ Initial,
+ RegisterPromisePending,
+ Ready,
+ ContextStopped
+ };
+
static PassRefPtr<ServiceWorker> create(ExecutionContext*, PassOwnPtr<blink::WebServiceWorker>);
ServiceWorker(ExecutionContext*, PassOwnPtr<blink::WebServiceWorker>);
+ void setProxyState(ProxyState);
void onPromiseResolved();
void waitOnPromise(ScriptPromise);
+ // ActiveDOMObject overrides.
+ virtual bool hasPendingActivity() const OVERRIDE;
+ virtual void stop() OVERRIDE;
+
OwnPtr<blink::WebServiceWorker> m_outerWorker;
- bool m_isPromisePending;
+ ProxyState m_proxyState;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698