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

Side by Side Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.cpp

Issue 2748213003: Service Worker event dispatcher for Background Fetch (Closed)
Patch Set: uma fix 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 unified diff | Download patch
OLDNEW
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/BackgroundFetchedEvent.h" 5 #include "modules/background_fetch/BackgroundFetchedEvent.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "core/dom/DOMException.h" 9 #include "core/dom/DOMException.h"
10 #include "modules/EventModulesNames.h" 10 #include "modules/EventModulesNames.h"
11 #include "modules/background_fetch/BackgroundFetchBridge.h" 11 #include "modules/background_fetch/BackgroundFetchBridge.h"
12 #include "modules/background_fetch/BackgroundFetchSettledFetch.h" 12 #include "modules/background_fetch/BackgroundFetchSettledFetch.h"
13 #include "modules/background_fetch/BackgroundFetchedEventInit.h" 13 #include "modules/background_fetch/BackgroundFetchedEventInit.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 BackgroundFetchedEvent::BackgroundFetchedEvent( 17 BackgroundFetchedEvent::BackgroundFetchedEvent(
18 const AtomicString& type, 18 const AtomicString& type,
19 const BackgroundFetchedEventInit& init, 19 const BackgroundFetchedEventInit& init,
20 ServiceWorkerRegistration* registration) 20 ServiceWorkerRegistration* registration)
21 : BackgroundFetchEvent(type, init), 21 : BackgroundFetchEvent(type, init, nullptr /* observer */),
22 m_fetches(init.fetches()), 22 m_fetches(init.fetches()),
23 m_registration(registration) {} 23 m_registration(registration) {}
24 24
25 BackgroundFetchedEvent::~BackgroundFetchedEvent() = default; 25 BackgroundFetchedEvent::~BackgroundFetchedEvent() = default;
26 26
27 HeapVector<Member<BackgroundFetchSettledFetch>> 27 HeapVector<Member<BackgroundFetchSettledFetch>>
28 BackgroundFetchedEvent::fetches() const { 28 BackgroundFetchedEvent::fetches() const {
29 return m_fetches; 29 return m_fetches;
30 } 30 }
31 31
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return EventNames::BackgroundFetchedEvent; 67 return EventNames::BackgroundFetchedEvent;
68 } 68 }
69 69
70 DEFINE_TRACE(BackgroundFetchedEvent) { 70 DEFINE_TRACE(BackgroundFetchedEvent) {
71 visitor->trace(m_fetches); 71 visitor->trace(m_fetches);
72 visitor->trace(m_registration); 72 visitor->trace(m_registration);
73 BackgroundFetchEvent::trace(visitor); 73 BackgroundFetchEvent::trace(visitor);
74 } 74 }
75 75
76 } // namespace blink 76 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698