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 #ifndef BackgroundFetchFailEvent_h | 5 #ifndef BackgroundFetchFailEvent_h |
6 #define BackgroundFetchFailEvent_h | 6 #define BackgroundFetchFailEvent_h |
7 | 7 |
| 8 #include "modules/ModulesExport.h" |
8 #include "modules/background_fetch/BackgroundFetchEvent.h" | 9 #include "modules/background_fetch/BackgroundFetchEvent.h" |
9 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 #include "public/platform/WebVector.h" |
10 #include "wtf/text/AtomicString.h" | 12 #include "wtf/text/AtomicString.h" |
11 | 13 |
12 namespace blink { | 14 namespace blink { |
13 | 15 |
14 class BackgroundFetchFailEventInit; | 16 class BackgroundFetchFailEventInit; |
15 class BackgroundFetchSettledFetch; | 17 class BackgroundFetchSettledFetch; |
| 18 class ScriptState; |
| 19 struct WebBackgroundFetchSettledFetch; |
16 | 20 |
17 class BackgroundFetchFailEvent final : public BackgroundFetchEvent { | 21 class MODULES_EXPORT BackgroundFetchFailEvent final |
| 22 : public BackgroundFetchEvent { |
18 DEFINE_WRAPPERTYPEINFO(); | 23 DEFINE_WRAPPERTYPEINFO(); |
19 | 24 |
20 public: | 25 public: |
21 static BackgroundFetchFailEvent* create( | 26 static BackgroundFetchFailEvent* create( |
22 const AtomicString& type, | 27 const AtomicString& type, |
23 const BackgroundFetchFailEventInit& initializer) { | 28 const BackgroundFetchFailEventInit& initializer) { |
24 return new BackgroundFetchFailEvent(type, initializer); | 29 return new BackgroundFetchFailEvent(type, initializer); |
25 } | 30 } |
26 | 31 |
| 32 static BackgroundFetchFailEvent* create( |
| 33 const AtomicString& type, |
| 34 const BackgroundFetchFailEventInit& initializer, |
| 35 const WebVector<WebBackgroundFetchSettledFetch>& fetches, |
| 36 ScriptState* scriptState, |
| 37 WaitUntilObserver* observer) { |
| 38 return new BackgroundFetchFailEvent(type, initializer, fetches, scriptState, |
| 39 observer); |
| 40 } |
| 41 |
27 ~BackgroundFetchFailEvent() override; | 42 ~BackgroundFetchFailEvent() override; |
28 | 43 |
29 // Web Exposed attribute defined in the IDL file. | 44 // Web Exposed attribute defined in the IDL file. |
30 HeapVector<Member<BackgroundFetchSettledFetch>> fetches() const; | 45 HeapVector<Member<BackgroundFetchSettledFetch>> fetches() const; |
31 | 46 |
32 // ExtendableEvent interface. | 47 // ExtendableEvent interface. |
33 const AtomicString& interfaceName() const override; | 48 const AtomicString& interfaceName() const override; |
34 | 49 |
35 DECLARE_VIRTUAL_TRACE(); | 50 DECLARE_VIRTUAL_TRACE(); |
36 | 51 |
37 private: | 52 private: |
38 BackgroundFetchFailEvent(const AtomicString& type, | 53 BackgroundFetchFailEvent(const AtomicString& type, |
39 const BackgroundFetchFailEventInit&); | 54 const BackgroundFetchFailEventInit&); |
| 55 BackgroundFetchFailEvent( |
| 56 const AtomicString& type, |
| 57 const BackgroundFetchFailEventInit&, |
| 58 const WebVector<WebBackgroundFetchSettledFetch>& fetches, |
| 59 ScriptState*, |
| 60 WaitUntilObserver*); |
40 | 61 |
41 HeapVector<Member<BackgroundFetchSettledFetch>> m_fetches; | 62 HeapVector<Member<BackgroundFetchSettledFetch>> m_fetches; |
42 }; | 63 }; |
43 | 64 |
44 } // namespace blink | 65 } // namespace blink |
45 | 66 |
46 #endif // BackgroundFetchFailEvent_h | 67 #endif // BackgroundFetchFailEvent_h |
OLD | NEW |