| Index: third_party/WebKit/Source/modules/background_sync/SyncManager.h
|
| diff --git a/third_party/WebKit/Source/modules/background_sync/SyncManager.h b/third_party/WebKit/Source/modules/background_sync/SyncManager.h
|
| index 22b3fbbe8190473dae4d73a49f740a8f45402a28..accbe2d235ee577b7e740cefd33da37fcdc51803 100644
|
| --- a/third_party/WebKit/Source/modules/background_sync/SyncManager.h
|
| +++ b/third_party/WebKit/Source/modules/background_sync/SyncManager.h
|
| @@ -7,17 +7,18 @@
|
|
|
| #include "bindings/core/v8/ScriptWrappable.h"
|
| #include "platform/heap/Handle.h"
|
| +#include "public/platform/modules/background_sync/background_sync.mojom-blink.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| namespace blink {
|
|
|
| -class BackgroundSyncProvider;
|
| class ExecutionContext;
|
| class ScriptPromise;
|
| +class ScriptPromiseResolver;
|
| class ScriptState;
|
| class ServiceWorkerRegistration;
|
|
|
| -class SyncManager final : public GarbageCollected<SyncManager>,
|
| +class SyncManager final : public GarbageCollectedFinalized<SyncManager>,
|
| public ScriptWrappable {
|
| DEFINE_WRAPPERTYPEINFO();
|
|
|
| @@ -36,9 +37,22 @@ class SyncManager final : public GarbageCollected<SyncManager>,
|
| private:
|
| explicit SyncManager(ServiceWorkerRegistration*);
|
|
|
| - static BackgroundSyncProvider* backgroundSyncProvider();
|
| + // Returns an initialized BackgroundSyncServicePtr. A connection with the
|
| + // the browser's BackgroundSyncService is created the first time this method
|
| + // is called.
|
| + const mojom::blink::BackgroundSyncServicePtr& getBackgroundSyncServicePtr();
|
| +
|
| + // Callbacks
|
| + static void registerCallback(ScriptPromiseResolver*,
|
| + mojom::blink::BackgroundSyncError,
|
| + mojom::blink::SyncRegistrationPtr options);
|
| + static void getRegistrationsCallback(
|
| + ScriptPromiseResolver*,
|
| + mojom::blink::BackgroundSyncError,
|
| + mojo::WTFArray<mojom::blink::SyncRegistrationPtr> registrations);
|
|
|
| Member<ServiceWorkerRegistration> m_registration;
|
| + mojom::blink::BackgroundSyncServicePtr m_backgroundSyncService;
|
| };
|
|
|
| } // namespace blink
|
|
|