OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |