Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1261)

Unified Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.cpp

Issue 2744873002: Implement the Request/Response bits of Background Fetch (Closed)
Patch Set: comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.cpp
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.cpp b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.cpp
index 25353ba68408fc7645917f8a7fd100f2cf52629a..d5cc50da50f26fc97d8016b63f06b37a45a91a44 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.cpp
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.cpp
@@ -7,6 +7,7 @@
#include "bindings/core/v8/ScriptState.h"
#include "core/dom/DOMException.h"
#include "modules/EventModulesNames.h"
+#include "modules/background_fetch/BackgroundFetchSettledRequest.h"
#include "modules/background_fetch/BackgroundFetchedEventInit.h"
namespace blink {
@@ -14,10 +15,16 @@ namespace blink {
BackgroundFetchedEvent::BackgroundFetchedEvent(
const AtomicString& type,
const BackgroundFetchedEventInit& init)
- : BackgroundFetchEvent(type, init) {}
+ : BackgroundFetchEvent(type, init),
+ m_completedFetches(init.completedFetches()) {}
BackgroundFetchedEvent::~BackgroundFetchedEvent() = default;
+HeapVector<Member<BackgroundFetchSettledRequest>>
+BackgroundFetchedEvent::completedFetches() const {
+ return m_completedFetches;
+}
+
ScriptPromise BackgroundFetchedEvent::updateUI(ScriptState* scriptState,
String title) {
return ScriptPromise::rejectWithDOMException(
@@ -29,4 +36,9 @@ const AtomicString& BackgroundFetchedEvent::interfaceName() const {
return EventNames::BackgroundFetchedEvent;
}
+DEFINE_TRACE(BackgroundFetchedEvent) {
+ visitor->trace(m_completedFetches);
+ BackgroundFetchEvent::trace(visitor);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698