OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "modules/background_fetch/BackgroundFetchFailEvent.h" | 5 #include "modules/background_fetch/BackgroundFetchFailEvent.h" |
6 | 6 |
7 #include "modules/EventModulesNames.h" | 7 #include "modules/EventModulesNames.h" |
8 #include "modules/background_fetch/BackgroundFetchFailEventInit.h" | 8 #include "modules/background_fetch/BackgroundFetchFailEventInit.h" |
| 9 #include "modules/background_fetch/BackgroundFetchSettledRequest.h" |
9 | 10 |
10 namespace blink { | 11 namespace blink { |
11 | 12 |
12 BackgroundFetchFailEvent::BackgroundFetchFailEvent( | 13 BackgroundFetchFailEvent::BackgroundFetchFailEvent( |
13 const AtomicString& type, | 14 const AtomicString& type, |
14 const BackgroundFetchFailEventInit& init) | 15 const BackgroundFetchFailEventInit& init) |
15 : BackgroundFetchEvent(type, init) {} | 16 : BackgroundFetchEvent(type, init), m_failedFetches(init.failedFetches()) {} |
16 | 17 |
17 BackgroundFetchFailEvent::~BackgroundFetchFailEvent() = default; | 18 BackgroundFetchFailEvent::~BackgroundFetchFailEvent() = default; |
18 | 19 |
| 20 HeapVector<Member<BackgroundFetchSettledRequest>> |
| 21 BackgroundFetchFailEvent::failedFetches() const { |
| 22 return m_failedFetches; |
| 23 } |
| 24 |
19 const AtomicString& BackgroundFetchFailEvent::interfaceName() const { | 25 const AtomicString& BackgroundFetchFailEvent::interfaceName() const { |
20 return EventNames::BackgroundFetchFailEvent; | 26 return EventNames::BackgroundFetchFailEvent; |
21 } | 27 } |
22 | 28 |
| 29 DEFINE_TRACE(BackgroundFetchFailEvent) { |
| 30 visitor->trace(m_failedFetches); |
| 31 BackgroundFetchEvent::trace(visitor); |
| 32 } |
| 33 |
23 } // namespace blink | 34 } // namespace blink |
OLD | NEW |