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 BackgroundFetchedEvent_h | 5 #ifndef BackgroundFetchedEvent_h |
6 #define BackgroundFetchedEvent_h | 6 #define BackgroundFetchedEvent_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "modules/background_fetch/BackgroundFetchEvent.h" | 9 #include "modules/background_fetch/BackgroundFetchEvent.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
11 #include "wtf/text/AtomicString.h" | 11 #include "wtf/text/AtomicString.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
| 15 class BackgroundFetchSettledRequest; |
15 class BackgroundFetchedEventInit; | 16 class BackgroundFetchedEventInit; |
16 | 17 |
17 class BackgroundFetchedEvent final : public BackgroundFetchEvent { | 18 class BackgroundFetchedEvent final : public BackgroundFetchEvent { |
18 DEFINE_WRAPPERTYPEINFO(); | 19 DEFINE_WRAPPERTYPEINFO(); |
19 | 20 |
20 public: | 21 public: |
21 static BackgroundFetchedEvent* create( | 22 static BackgroundFetchedEvent* create( |
22 const AtomicString& type, | 23 const AtomicString& type, |
23 const BackgroundFetchedEventInit& initializer) { | 24 const BackgroundFetchedEventInit& initializer) { |
24 return new BackgroundFetchedEvent(type, initializer); | 25 return new BackgroundFetchedEvent(type, initializer); |
25 } | 26 } |
26 | 27 |
27 ~BackgroundFetchedEvent() override; | 28 ~BackgroundFetchedEvent() override; |
28 | 29 |
| 30 // Web Exposed attribute defined in the IDL file. |
| 31 HeapVector<Member<BackgroundFetchSettledRequest>> completedFetches() const; |
| 32 |
29 // Web Exposed method defined in the IDL file. | 33 // Web Exposed method defined in the IDL file. |
30 ScriptPromise updateUI(ScriptState*, String title); | 34 ScriptPromise updateUI(ScriptState*, String title); |
31 | 35 |
32 // ExtendableEvent interface. | 36 // ExtendableEvent interface. |
33 const AtomicString& interfaceName() const override; | 37 const AtomicString& interfaceName() const override; |
34 | 38 |
| 39 DECLARE_VIRTUAL_TRACE(); |
| 40 |
35 private: | 41 private: |
36 BackgroundFetchedEvent(const AtomicString& type, | 42 BackgroundFetchedEvent(const AtomicString& type, |
37 const BackgroundFetchedEventInit&); | 43 const BackgroundFetchedEventInit&); |
| 44 |
| 45 HeapVector<Member<BackgroundFetchSettledRequest>> m_completedFetches; |
38 }; | 46 }; |
39 | 47 |
40 } // namespace blink | 48 } // namespace blink |
41 | 49 |
42 #endif // BackgroundFetchedEvent_h | 50 #endif // BackgroundFetchedEvent_h |
OLD | NEW |