// 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.

#include "components/sharing_message/mock_sharing_service.h"

#include "components/sharing_message/sharing_channel_sender.h"
#include "components/sharing_message/sharing_device_source.h"
#include "components/sharing_message/sharing_fcm_handler.h"
#include "components/sharing_message/sharing_handler_registry.h"
#include "components/sharing_message/sharing_sync_preference.h"
#include "components/sync/protocol/device_info_specifics.pb.h"
#include "testing/gmock/include/gmock/gmock.h"

class FakeSharingDeviceRegistration : public SharingDeviceRegistration {
 public:
  FakeSharingDeviceRegistration() = default;
  ~FakeSharingDeviceRegistration() override = default;

  void RegisterDevice(
      SharingDeviceRegistration::RegistrationCallback callback) override {}

  void UnregisterDevice(
      SharingDeviceRegistration::RegistrationCallback callback) override {}

  bool IsSmsFetcherSupported() const override { return false; }

  bool IsRemoteCopySupported() const override { return false; }

  bool IsOptimizationGuidePushNotificationSupported() const override {
    return false;
  }

  bool IsOneTimeTokenBackendNotificationSupported() const override {
    return false;
  }

  bool IsGlicExperimentalTriggeringSupported() const override { return false; }

  bool IsBrowserActuatorSupported() const override { return false; }

  void SetEnabledFeaturesForTesting(
      std::set<syncer::DeviceInfo::SharingFeature> enabled_features) override {}
};

MockSharingService::MockSharingService()
    : SharingService(
          /*sync_prefs=*/nullptr,
          std::make_unique<FakeSharingDeviceRegistration>(),
          /*message_sender=*/nullptr,
          /*device_source=*/nullptr,
          /*handler_registry=*/nullptr,
          std::make_unique<SharingFCMHandler>(
              /*gcm_driver=*/nullptr,
              /*device_info_tracker=*/nullptr,
              /*sharing_channel_sender=*/nullptr,
              /*handler_registry=*/nullptr),
          /*sync_service=*/nullptr,
          /*send_tab_model=*/nullptr,
          /*task_runner=*/nullptr) {}

MockSharingService::~MockSharingService() = default;
