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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h

Issue 2767093004: Implement the BackgroundFetch{Fail,ed} Service Worker events (Closed)
Patch Set: add missing uma Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WaitUntilObserver_h 5 #ifndef WaitUntilObserver_h
6 #define WaitUntilObserver_h 6 #define WaitUntilObserver_h
7 7
8 #include "modules/ModulesExport.h" 8 #include "modules/ModulesExport.h"
9 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" 9 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h"
10 #include "platform/Timer.h" 10 #include "platform/Timer.h"
(...skipping 15 matching lines...) Expand all
26 Activate, 26 Activate,
27 Fetch, 27 Fetch,
28 Install, 28 Install,
29 Message, 29 Message,
30 NotificationClick, 30 NotificationClick,
31 NotificationClose, 31 NotificationClose,
32 PaymentRequest, 32 PaymentRequest,
33 Push, 33 Push,
34 Sync, 34 Sync,
35 BackgroundFetchAbort, 35 BackgroundFetchAbort,
36 BackgroundFetchClick 36 BackgroundFetchClick,
37 BackgroundFetchFail,
38 BackgroundFetched
37 }; 39 };
38 40
39 static WaitUntilObserver* create(ExecutionContext*, EventType, int eventID); 41 static WaitUntilObserver* create(ExecutionContext*, EventType, int eventID);
40 42
41 // Must be called before and after dispatching the event. 43 // Must be called before and after dispatching the event.
42 void willDispatchEvent(); 44 void willDispatchEvent();
43 void didDispatchEvent(bool errorOccurred); 45 void didDispatchEvent(bool errorOccurred);
44 46
45 // Observes the promise and delays calling the continuation until 47 // Observes the promise and delays calling the continuation until
46 // the given promise is resolved or rejected. 48 // the given promise is resolved or rejected.
(...skipping 25 matching lines...) Expand all
72 int m_pendingActivity = 0; 74 int m_pendingActivity = 0;
73 bool m_hasError = false; 75 bool m_hasError = false;
74 bool m_eventDispatched = false; 76 bool m_eventDispatched = false;
75 double m_eventDispatchTime = 0; 77 double m_eventDispatchTime = 0;
76 TaskRunnerTimer<WaitUntilObserver> m_consumeWindowInteractionTimer; 78 TaskRunnerTimer<WaitUntilObserver> m_consumeWindowInteractionTimer;
77 }; 79 };
78 80
79 } // namespace blink 81 } // namespace blink
80 82
81 #endif // WaitUntilObserver_h 83 #endif // WaitUntilObserver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698