// third_party/blink/public/mojom/background_sync/background_sync.mojom-blink-test-utils.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_PUBLIC_MOJOM_BACKGROUND_SYNC_BACKGROUND_SYNC_MOJOM_BLINK_TEST_UTILS_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_BACKGROUND_SYNC_BACKGROUND_SYNC_MOJOM_BLINK_TEST_UTILS_H_

#include "third_party/blink/public/mojom/background_sync/background_sync.mojom-blink.h"
#include "third_party/blink/renderer/platform/platform_export.h"


namespace blink::mojom::blink {


class PLATFORM_EXPORT OneShotBackgroundSyncServiceInterceptorForTesting : public OneShotBackgroundSyncService {
  virtual OneShotBackgroundSyncService* GetForwardingInterface() = 0;
  void Register(SyncRegistrationOptionsPtr options, int64_t service_worker_registration_id, RegisterCallback callback) override;
  void DidResolveRegistration(BackgroundSyncRegistrationInfoPtr registration_info) override;
  void GetRegistrations(int64_t service_worker_registration_id, GetRegistrationsCallback callback) override;
};
class PLATFORM_EXPORT OneShotBackgroundSyncServiceAsyncWaiter {
 public:
  explicit OneShotBackgroundSyncServiceAsyncWaiter(OneShotBackgroundSyncService* proxy);

  OneShotBackgroundSyncServiceAsyncWaiter(const OneShotBackgroundSyncServiceAsyncWaiter&) = delete;
  OneShotBackgroundSyncServiceAsyncWaiter& operator=(const OneShotBackgroundSyncServiceAsyncWaiter&) = delete;

  ~OneShotBackgroundSyncServiceAsyncWaiter();
  void Register(
      SyncRegistrationOptionsPtr options, int64_t service_worker_registration_id, BackgroundSyncError* out_err, SyncRegistrationOptionsPtr* out_options);
  
  void GetRegistrations(
      int64_t service_worker_registration_id, BackgroundSyncError* out_err, ::blink::Vector<SyncRegistrationOptionsPtr>* out_registrations);
  

 private:
  OneShotBackgroundSyncService* const proxy_;
};


class PLATFORM_EXPORT PeriodicBackgroundSyncServiceInterceptorForTesting : public PeriodicBackgroundSyncService {
  virtual PeriodicBackgroundSyncService* GetForwardingInterface() = 0;
  void Register(SyncRegistrationOptionsPtr options, int64_t service_worker_registration_id, RegisterCallback callback) override;
  void Unregister(int64_t service_worker_registration_id, const ::blink::String& tag, UnregisterCallback callback) override;
  void GetRegistrations(int64_t service_worker_registration_id, GetRegistrationsCallback callback) override;
};
class PLATFORM_EXPORT PeriodicBackgroundSyncServiceAsyncWaiter {
 public:
  explicit PeriodicBackgroundSyncServiceAsyncWaiter(PeriodicBackgroundSyncService* proxy);

  PeriodicBackgroundSyncServiceAsyncWaiter(const PeriodicBackgroundSyncServiceAsyncWaiter&) = delete;
  PeriodicBackgroundSyncServiceAsyncWaiter& operator=(const PeriodicBackgroundSyncServiceAsyncWaiter&) = delete;

  ~PeriodicBackgroundSyncServiceAsyncWaiter();
  void Register(
      SyncRegistrationOptionsPtr options, int64_t service_worker_registration_id, BackgroundSyncError* out_err, SyncRegistrationOptionsPtr* out_options);
  
  void Unregister(
      int64_t service_worker_registration_id, const ::blink::String& tag, BackgroundSyncError* out_err);
  BackgroundSyncError Unregister(int64_t service_worker_registration_id, const ::blink::String& tag);
  void GetRegistrations(
      int64_t service_worker_registration_id, BackgroundSyncError* out_err, ::blink::Vector<SyncRegistrationOptionsPtr>* out_registrations);
  

 private:
  PeriodicBackgroundSyncService* const proxy_;
};




}  // blink::mojom::blink

#endif  // THIRD_PARTY_BLINK_PUBLIC_MOJOM_BACKGROUND_SYNC_BACKGROUND_SYNC_MOJOM_BLINK_TEST_UTILS_H_