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/serviceworkers/ServiceWorkerGlobalScopeClient.h" | 9 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" |
| 10 #include "platform/Timer.h" |
10 #include "wtf/Forward.h" | 11 #include "wtf/Forward.h" |
11 #include "wtf/RefCounted.h" | 12 #include "wtf/RefCounted.h" |
12 | 13 |
13 namespace blink { | 14 namespace blink { |
14 | 15 |
15 class ExceptionState; | 16 class ExceptionState; |
16 class ExecutionContext; | 17 class ExecutionContext; |
17 class ScriptState; | 18 class ScriptState; |
18 class ScriptValue; | 19 class ScriptValue; |
19 | 20 |
(...skipping 23 matching lines...) Expand all Loading... |
43 private: | 44 private: |
44 class ThenFunction; | 45 class ThenFunction; |
45 | 46 |
46 WaitUntilObserver(ExecutionContext*, EventType, int eventID); | 47 WaitUntilObserver(ExecutionContext*, EventType, int eventID); |
47 | 48 |
48 void reportError(const ScriptValue&); | 49 void reportError(const ScriptValue&); |
49 | 50 |
50 void incrementPendingActivity(); | 51 void incrementPendingActivity(); |
51 void decrementPendingActivity(); | 52 void decrementPendingActivity(); |
52 | 53 |
| 54 void consumeWindowInteraction(Timer<WaitUntilObserver>*); |
| 55 |
53 EventType m_type; | 56 EventType m_type; |
54 int m_eventID; | 57 int m_eventID; |
55 int m_pendingActivity; | 58 int m_pendingActivity; |
56 bool m_hasError; | 59 bool m_hasError; |
57 bool m_eventDispatched; | 60 bool m_eventDispatched; |
| 61 Timer<WaitUntilObserver> m_consumeWindowInteractionTimer; |
58 }; | 62 }; |
59 | 63 |
60 } // namespace blink | 64 } // namespace blink |
61 | 65 |
62 #endif // WaitUntilObserver_h | 66 #endif // WaitUntilObserver_h |
OLD | NEW |