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 #include "config.h" | 5 #include "config.h" |
6 #include "modules/background_sync/SyncEvent.h" | 6 #include "modules/background_sync/SyncEvent.h" |
7 | 7 |
8 namespace blink { | 8 namespace blink { |
9 | 9 |
10 SyncEvent::SyncEvent() | 10 SyncEvent::SyncEvent() |
11 { | 11 { |
12 } | 12 } |
13 | 13 |
14 SyncEvent::SyncEvent(const AtomicString& type, SyncRegistration* syncRegistratio
n, bool lastChance, WaitUntilObserver* observer) | 14 SyncEvent::SyncEvent(const AtomicString& type, const String& tag, bool lastChanc
e, WaitUntilObserver* observer) |
15 : ExtendableEvent(type, ExtendableEventInit(), observer) | 15 : ExtendableEvent(type, ExtendableEventInit(), observer) |
16 , m_syncRegistration(syncRegistration) | 16 , m_tag(tag) |
17 , m_lastChance(lastChance) | 17 , m_lastChance(lastChance) |
18 { | 18 { |
19 } | 19 } |
20 | 20 |
21 SyncEvent::SyncEvent(const AtomicString& type, const SyncEventInit& init) | 21 SyncEvent::SyncEvent(const AtomicString& type, const SyncEventInit& init) |
22 : ExtendableEvent(type, init) | 22 : ExtendableEvent(type, init) |
23 { | 23 { |
24 m_syncRegistration = init.registration(); | 24 m_tag = init.tag(); |
25 m_lastChance = init.lastChance(); | 25 m_lastChance = init.lastChance(); |
26 } | 26 } |
27 | 27 |
28 SyncEvent::~SyncEvent() | 28 SyncEvent::~SyncEvent() |
29 { | 29 { |
30 } | 30 } |
31 | 31 |
32 const AtomicString& SyncEvent::interfaceName() const | 32 const AtomicString& SyncEvent::interfaceName() const |
33 { | 33 { |
34 return EventNames::SyncEvent; | 34 return EventNames::SyncEvent; |
35 } | 35 } |
36 | 36 |
37 SyncRegistration* SyncEvent::registration() | 37 String SyncEvent::tag() |
38 { | 38 { |
39 return m_syncRegistration.get(); | 39 return m_tag; |
40 } | 40 } |
41 | 41 |
42 bool SyncEvent::lastChance() | 42 bool SyncEvent::lastChance() |
43 { | 43 { |
44 return m_lastChance; | 44 return m_lastChance; |
45 } | 45 } |
46 | 46 |
47 DEFINE_TRACE(SyncEvent) | 47 DEFINE_TRACE(SyncEvent) |
48 { | 48 { |
49 visitor->trace(m_syncRegistration); | |
50 ExtendableEvent::trace(visitor); | 49 ExtendableEvent::trace(visitor); |
51 } | 50 } |
52 | 51 |
53 } // namespace blink | 52 } // namespace blink |
OLD | NEW |