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 "core/dom/ContextLifecycleObserver.h" | 8 #include "core/dom/ContextLifecycleObserver.h" |
9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
10 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" | 10 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 USING_GARBAGE_COLLECTED_MIXIN(WaitUntilObserver); | 26 USING_GARBAGE_COLLECTED_MIXIN(WaitUntilObserver); |
27 | 27 |
28 public: | 28 public: |
29 enum EventType { | 29 enum EventType { |
30 Activate, | 30 Activate, |
31 Fetch, | 31 Fetch, |
32 Install, | 32 Install, |
33 Message, | 33 Message, |
34 NotificationClick, | 34 NotificationClick, |
35 NotificationClose, | 35 NotificationClose, |
| 36 PaymentRequest, |
36 Push, | 37 Push, |
37 Sync | 38 Sync |
38 }; | 39 }; |
39 | 40 |
40 static WaitUntilObserver* create(ExecutionContext*, EventType, int eventID); | 41 static WaitUntilObserver* create(ExecutionContext*, EventType, int eventID); |
41 | 42 |
42 // Must be called before and after dispatching the event. | 43 // Must be called before and after dispatching the event. |
43 void willDispatchEvent(); | 44 void willDispatchEvent(); |
44 void didDispatchEvent(bool errorOccurred); | 45 void didDispatchEvent(bool errorOccurred); |
45 | 46 |
(...skipping 26 matching lines...) Expand all Loading... |
72 int m_pendingActivity = 0; | 73 int m_pendingActivity = 0; |
73 bool m_hasError = false; | 74 bool m_hasError = false; |
74 bool m_eventDispatched = false; | 75 bool m_eventDispatched = false; |
75 double m_eventDispatchTime = 0; | 76 double m_eventDispatchTime = 0; |
76 Timer<WaitUntilObserver> m_consumeWindowInteractionTimer; | 77 Timer<WaitUntilObserver> m_consumeWindowInteractionTimer; |
77 }; | 78 }; |
78 | 79 |
79 } // namespace blink | 80 } // namespace blink |
80 | 81 |
81 #endif // WaitUntilObserver_h | 82 #endif // WaitUntilObserver_h |
OLD | NEW |