#include "chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h"
#include "base/functional/bind.h"
#include "base/task/sequenced_task_runner.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/media/router/discovery/discovery_network_monitor.h"
#include "chrome/browser/media/router/discovery/mdns/media_sink_util.h"
#include "chrome/browser/media/router/media_router_feature.h"
#include "components/media_router/common/media_sink.h"
#include "components/media_router/common/pref_names.h"
#include "components/media_router/common/providers/cast/channel/cast_socket_service.h"
#include "components/prefs/pref_service.h"
namespace media_router {
constexpr char kLoggerComponent[] = …;
CastMediaSinkService::CastMediaSinkService()
: … { … }
CastMediaSinkService::~CastMediaSinkService() { … }
void CastMediaSinkService::Initialize(
const OnSinksDiscoveredCallback& sinks_discovered_cb,
base::RepeatingClosure discovery_permission_rejected_cb,
MediaSinkServiceBase* dial_media_sink_service) { … }
void CastMediaSinkService::StopObservingPrefChanges() { … }
std::unique_ptr<CastMediaSinkServiceImpl, base::OnTaskRunnerDeleter>
CastMediaSinkService::CreateImpl(
const OnSinksDiscoveredCallback& sinks_discovered_cb,
MediaSinkServiceBase* dial_media_sink_service) { … }
void CastMediaSinkService::SetCastAllowAllIPs() { … }
void CastMediaSinkService::StartMdnsDiscovery() { … }
bool CastMediaSinkService::MdnsDiscoveryStarted() const { … }
void CastMediaSinkService::DiscoverSinksNow() { … }
void CastMediaSinkService::SetDnsSdRegistryForTest(DnsSdRegistry* registry) { … }
void CastMediaSinkService::OnDnsSdEvent(
const std::string& service_type,
const DnsSdRegistry::DnsSdServiceList& services) { … }
void CastMediaSinkService::OnDnsSdPermissionRejected() { … }
void CastMediaSinkService::RunSinksDiscoveredCallback(
const OnSinksDiscoveredCallback& sinks_discovered_cb,
std::vector<MediaSinkInternal> sinks) { … }
}