| 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 PassRefPtrWillBeRawPtr<SyncEvent> create() | 20 static RawPtr<SyncEvent> create() |
| 21 { | 21 { |
| 22 return adoptRefWillBeNoop(new SyncEvent); | 22 return adoptRefWillBeNoop(new SyncEvent); |
| 23 } | 23 } |
| 24 static PassRefPtrWillBeRawPtr<SyncEvent> create(const AtomicString& type, co
nst String& tag, bool lastChance, WaitUntilObserver* observer) | 24 static RawPtr<SyncEvent> create(const AtomicString& type, const String& tag,
bool lastChance, WaitUntilObserver* observer) |
| 25 { | 25 { |
| 26 return adoptRefWillBeNoop(new SyncEvent(type, tag, lastChance, observer)
); | 26 return new SyncEvent(type, tag, lastChance, observer); |
| 27 } | 27 } |
| 28 static PassRefPtrWillBeRawPtr<SyncEvent> create(const AtomicString& type, co
nst SyncEventInit& init) | 28 static RawPtr<SyncEvent> create(const AtomicString& type, const SyncEventIni
t& init) |
| 29 { | 29 { |
| 30 return adoptRefWillBeNoop(new SyncEvent(type, init)); | 30 return new SyncEvent(type, init); |
| 31 } | 31 } |
| 32 | 32 |
| 33 ~SyncEvent() override; | 33 ~SyncEvent() override; |
| 34 | 34 |
| 35 const AtomicString& interfaceName() const override; | 35 const AtomicString& interfaceName() const override; |
| 36 | 36 |
| 37 String tag(); | 37 String tag(); |
| 38 bool lastChance(); | 38 bool lastChance(); |
| 39 | 39 |
| 40 DECLARE_VIRTUAL_TRACE(); | 40 DECLARE_VIRTUAL_TRACE(); |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 SyncEvent(); | 43 SyncEvent(); |
| 44 SyncEvent(const AtomicString& type, const String&, bool, WaitUntilObserver*)
; | 44 SyncEvent(const AtomicString& type, const String&, bool, WaitUntilObserver*)
; |
| 45 SyncEvent(const AtomicString& type, const SyncEventInit&); | 45 SyncEvent(const AtomicString& type, const SyncEventInit&); |
| 46 | 46 |
| 47 String m_tag; | 47 String m_tag; |
| 48 bool m_lastChance; | 48 bool m_lastChance; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace blink | 51 } // namespace blink |
| 52 | 52 |
| 53 #endif // SyncEvent_h | 53 #endif // SyncEvent_h |
| OLD | NEW |