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

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

Issue 2558773002: Remove ContextLifecycleObserver from WaitUntilObserver (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "core/dom/ContextLifecycleObserver.h"
9 #include "modules/ModulesExport.h" 8 #include "modules/ModulesExport.h"
10 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" 9 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h"
11 #include "platform/Timer.h" 10 #include "platform/Timer.h"
12 #include "wtf/Forward.h" 11 #include "wtf/Forward.h"
13 12
14 namespace blink { 13 namespace blink {
15 14
16 class ExceptionState; 15 class ExceptionState;
17 class ExecutionContext; 16 class ExecutionContext;
18 class ScriptPromise; 17 class ScriptPromise;
19 class ScriptState; 18 class ScriptState;
20 class ScriptValue; 19 class ScriptValue;
21 20
22 // Created for each ExtendableEvent instance. 21 // Created for each ExtendableEvent instance.
23 class MODULES_EXPORT WaitUntilObserver final 22 class MODULES_EXPORT WaitUntilObserver final
24 : public GarbageCollectedFinalized<WaitUntilObserver>, 23 : public GarbageCollectedFinalized<WaitUntilObserver> {
25 public ContextLifecycleObserver {
26 USING_GARBAGE_COLLECTED_MIXIN(WaitUntilObserver);
27
28 public: 24 public:
29 enum EventType { 25 enum EventType {
30 Activate, 26 Activate,
31 Fetch, 27 Fetch,
32 Install, 28 Install,
33 Message, 29 Message,
34 NotificationClick, 30 NotificationClick,
35 NotificationClose, 31 NotificationClose,
36 PaymentRequest, 32 PaymentRequest,
37 Push, 33 Push,
(...skipping 23 matching lines...) Expand all
61 private: 57 private:
62 friend class InternalsServiceWorker; 58 friend class InternalsServiceWorker;
63 class ThenFunction; 59 class ThenFunction;
64 60
65 WaitUntilObserver(ExecutionContext*, EventType, int eventID); 61 WaitUntilObserver(ExecutionContext*, EventType, int eventID);
66 62
67 void reportError(const ScriptValue&); 63 void reportError(const ScriptValue&);
68 64
69 void consumeWindowInteraction(TimerBase*); 65 void consumeWindowInteraction(TimerBase*);
70 66
67 Member<ExecutionContext> m_executionContext;
71 EventType m_type; 68 EventType m_type;
72 int m_eventID; 69 int m_eventID;
73 int m_pendingActivity = 0; 70 int m_pendingActivity = 0;
74 bool m_hasError = false; 71 bool m_hasError = false;
75 bool m_eventDispatched = false; 72 bool m_eventDispatched = false;
76 double m_eventDispatchTime = 0; 73 double m_eventDispatchTime = 0;
77 Timer<WaitUntilObserver> m_consumeWindowInteractionTimer; 74 Timer<WaitUntilObserver> m_consumeWindowInteractionTimer;
78 }; 75 };
79 76
80 } // namespace blink 77 } // namespace blink
81 78
82 #endif // WaitUntilObserver_h 79 #endif // WaitUntilObserver_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698