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

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

Issue 1619703002: Implement notificationclose event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits Created 4 years, 10 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 "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 11 matching lines...) Expand all
22 22
23 // Created for each ExtendableEvent instance. 23 // Created for each ExtendableEvent instance.
24 class MODULES_EXPORT WaitUntilObserver final : public GarbageCollectedFinalized< WaitUntilObserver>, public ContextLifecycleObserver { 24 class MODULES_EXPORT WaitUntilObserver final : public GarbageCollectedFinalized< WaitUntilObserver>, public ContextLifecycleObserver {
25 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WaitUntilObserver); 25 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WaitUntilObserver);
26 public: 26 public:
27 enum EventType { 27 enum EventType {
28 Activate, 28 Activate,
29 Install, 29 Install,
30 Message, 30 Message,
31 NotificationClick, 31 NotificationClick,
32 NotificationClose,
32 Push, 33 Push,
33 Sync 34 Sync
34 }; 35 };
35 36
36 static WaitUntilObserver* create(ExecutionContext*, EventType, int eventID); 37 static WaitUntilObserver* create(ExecutionContext*, EventType, int eventID);
37 38
38 // Must be called before and after dispatching the event. 39 // Must be called before and after dispatching the event.
39 void willDispatchEvent(); 40 void willDispatchEvent();
40 void didDispatchEvent(bool errorOccurred); 41 void didDispatchEvent(bool errorOccurred);
41 42
(...skipping 20 matching lines...) Expand all
62 int m_eventID; 63 int m_eventID;
63 int m_pendingActivity; 64 int m_pendingActivity;
64 bool m_hasError; 65 bool m_hasError;
65 bool m_eventDispatched; 66 bool m_eventDispatched;
66 Timer<WaitUntilObserver> m_consumeWindowInteractionTimer; 67 Timer<WaitUntilObserver> m_consumeWindowInteractionTimer;
67 }; 68 };
68 69
69 } // namespace blink 70 } // namespace blink
70 71
71 #endif // WaitUntilObserver_h 72 #endif // WaitUntilObserver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698