OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SyncEvent_h | 5 #ifndef SyncEvent_h |
6 #define SyncEvent_h | 6 #define SyncEvent_h |
7 | 7 |
8 #include "modules/EventModules.h" | 8 #include "modules/EventModules.h" |
9 #include "modules/background_sync/SyncEventInit.h" | 9 #include "modules/background_sync/SyncEventInit.h" |
10 #include "modules/serviceworkers/ExtendableEvent.h" | 10 #include "modules/serviceworkers/ExtendableEvent.h" |
11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
12 #include "wtf/text/AtomicString.h" | 12 #include "wtf/text/AtomicString.h" |
13 #include "wtf/text/WTFString.h" | 13 #include "wtf/text/WTFString.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 class MODULES_EXPORT SyncEvent final : public ExtendableEvent { | 17 class MODULES_EXPORT SyncEvent final : public ExtendableEvent { |
18 DEFINE_WRAPPERTYPEINFO(); | 18 DEFINE_WRAPPERTYPEINFO(); |
19 public: | 19 public: |
20 static SyncEvent* create() | |
21 { | |
22 return new SyncEvent; | |
23 } | |
24 static SyncEvent* create(const AtomicString& type, const String& tag, bool l
astChance, WaitUntilObserver* observer) | 20 static SyncEvent* create(const AtomicString& type, const String& tag, bool l
astChance, WaitUntilObserver* observer) |
25 { | 21 { |
26 return new SyncEvent(type, tag, lastChance, observer); | 22 return new SyncEvent(type, tag, lastChance, observer); |
27 } | 23 } |
28 static SyncEvent* create(const AtomicString& type, const SyncEventInit& init
) | 24 static SyncEvent* create(const AtomicString& type, const SyncEventInit& init
) |
29 { | 25 { |
30 return new SyncEvent(type, init); | 26 return new SyncEvent(type, init); |
31 } | 27 } |
32 | 28 |
33 ~SyncEvent() override; | 29 ~SyncEvent() override; |
34 | 30 |
35 const AtomicString& interfaceName() const override; | 31 const AtomicString& interfaceName() const override; |
36 | 32 |
37 String tag(); | 33 String tag(); |
38 bool lastChance(); | 34 bool lastChance(); |
39 | 35 |
40 DECLARE_VIRTUAL_TRACE(); | 36 DECLARE_VIRTUAL_TRACE(); |
41 | 37 |
42 private: | 38 private: |
43 SyncEvent(); | |
44 SyncEvent(const AtomicString& type, const String&, bool, WaitUntilObserver*)
; | 39 SyncEvent(const AtomicString& type, const String&, bool, WaitUntilObserver*)
; |
45 SyncEvent(const AtomicString& type, const SyncEventInit&); | 40 SyncEvent(const AtomicString& type, const SyncEventInit&); |
46 | 41 |
47 String m_tag; | 42 String m_tag; |
48 bool m_lastChance; | 43 bool m_lastChance; |
49 }; | 44 }; |
50 | 45 |
51 } // namespace blink | 46 } // namespace blink |
52 | 47 |
53 #endif // SyncEvent_h | 48 #endif // SyncEvent_h |
OLD | NEW |