| Index: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.h
|
| diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.h
|
| index aaee6f61e9be01c065e1e04aef395195df48a002..1e635949468c8426f64dd5331ccc8b7c9532a618 100644
|
| --- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.h
|
| +++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.h
|
| @@ -8,12 +8,14 @@
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| #include "modules/background_fetch/BackgroundFetchEvent.h"
|
| #include "platform/heap/Handle.h"
|
| +#include "public/platform/modules/background_fetch/background_fetch.mojom-blink.h"
|
| #include "wtf/text/AtomicString.h"
|
|
|
| namespace blink {
|
|
|
| class BackgroundFetchSettledRequest;
|
| class BackgroundFetchedEventInit;
|
| +class ServiceWorkerRegistration;
|
|
|
| class BackgroundFetchedEvent final : public BackgroundFetchEvent {
|
| DEFINE_WRAPPERTYPEINFO();
|
| @@ -22,7 +24,15 @@ class BackgroundFetchedEvent final : public BackgroundFetchEvent {
|
| static BackgroundFetchedEvent* create(
|
| const AtomicString& type,
|
| const BackgroundFetchedEventInit& initializer) {
|
| - return new BackgroundFetchedEvent(type, initializer);
|
| + return new BackgroundFetchedEvent(type, initializer,
|
| + nullptr /* registration */);
|
| + }
|
| +
|
| + static BackgroundFetchedEvent* create(
|
| + const AtomicString& type,
|
| + const BackgroundFetchedEventInit& initializer,
|
| + ServiceWorkerRegistration* registration) {
|
| + return new BackgroundFetchedEvent(type, initializer, registration);
|
| }
|
|
|
| ~BackgroundFetchedEvent() override;
|
| @@ -31,7 +41,7 @@ class BackgroundFetchedEvent final : public BackgroundFetchEvent {
|
| HeapVector<Member<BackgroundFetchSettledRequest>> completedFetches() const;
|
|
|
| // Web Exposed method defined in the IDL file.
|
| - ScriptPromise updateUI(ScriptState*, String title);
|
| + ScriptPromise updateUI(ScriptState*, const String& title);
|
|
|
| // ExtendableEvent interface.
|
| const AtomicString& interfaceName() const override;
|
| @@ -40,9 +50,13 @@ class BackgroundFetchedEvent final : public BackgroundFetchEvent {
|
|
|
| private:
|
| BackgroundFetchedEvent(const AtomicString& type,
|
| - const BackgroundFetchedEventInit&);
|
| + const BackgroundFetchedEventInit&,
|
| + ServiceWorkerRegistration*);
|
| +
|
| + void didUpdateUI(ScriptPromiseResolver*, mojom::blink::BackgroundFetchError);
|
|
|
| HeapVector<Member<BackgroundFetchSettledRequest>> m_completedFetches;
|
| + Member<ServiceWorkerRegistration> m_registration;
|
| };
|
|
|
| } // namespace blink
|
|
|