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

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

Issue 214413004: Dispatch the ServiceWorker "activate" event during activation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing w/ ASSERT. Created 6 years, 9 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/WaitUntilObserver.h
diff --git a/Source/modules/serviceworkers/WaitUntilObserver.h b/Source/modules/serviceworkers/WaitUntilObserver.h
index f20836445d07823c062640e9306bc812208aea4f..e0c4e7462da2c9c0cc8f9028b931138e21d677b7 100644
--- a/Source/modules/serviceworkers/WaitUntilObserver.h
+++ b/Source/modules/serviceworkers/WaitUntilObserver.h
@@ -20,7 +20,12 @@ class WaitUntilObserver FINAL :
public ContextLifecycleObserver,
public RefCounted<WaitUntilObserver> {
public:
- static PassRefPtr<WaitUntilObserver> create(ExecutionContext*, int eventID);
+ enum EventType {
+ Activate,
+ Install
+ };
+
+ static PassRefPtr<WaitUntilObserver> create(ExecutionContext*, EventType, int eventID);
~WaitUntilObserver();
@@ -28,20 +33,21 @@ public:
void willDispatchEvent();
void didDispatchEvent();
- // Observes the promise and delays calling didHandleInstallEvent() until
+ // Observes the promise and delays calling the continuation until
// the given promise is resolved or rejected.
void waitUntil(const ScriptValue&);
private:
class ThenFunction;
- WaitUntilObserver(ExecutionContext*, int eventID);
+ WaitUntilObserver(ExecutionContext*, EventType, int eventID);
void reportError(const ScriptValue&);
void incrementPendingActivity();
void decrementPendingActivity();
+ EventType m_type;
int m_eventID;
int m_pendingActivity;
bool m_hasError;
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h ('k') | Source/modules/serviceworkers/WaitUntilObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698