#include "components/media_router/common/discovery/media_sink_service_base.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/observer_list.h"
#include "components/media_router/common/media_route.h"
#include <vector>
namespace {
const constexpr base::TimeDelta kDiscoveryTimeout = …;
}
namespace media_router {
MediaSinkServiceBase::MediaSinkServiceBase(
const OnSinksDiscoveredCallback& callback)
: … { … }
MediaSinkServiceBase::~MediaSinkServiceBase() { … }
void MediaSinkServiceBase::AddObserver(Observer* observer) { … }
void MediaSinkServiceBase::RemoveObserver(Observer* observer) { … }
const base::flat_map<MediaSink::Id, MediaSinkInternal>&
MediaSinkServiceBase::GetSinks() const { … }
const MediaSinkInternal* MediaSinkServiceBase::GetSinkById(
const MediaSink::Id& sink_id) const { … }
const MediaSinkInternal* MediaSinkServiceBase::GetSinkByRoute(
const MediaRoute& route) const { … }
void MediaSinkServiceBase::AddOrUpdateSink(const MediaSinkInternal& sink) { … }
void MediaSinkServiceBase::RemoveSink(const MediaSinkInternal& sink) { … }
void MediaSinkServiceBase::RemoveSinkById(const MediaSink::Id& sink_id) { … }
void MediaSinkServiceBase::SetTimerForTest(
std::unique_ptr<base::OneShotTimer> timer) { … }
void MediaSinkServiceBase::AddSinkForTest(const MediaSinkInternal& sink) { … }
void MediaSinkServiceBase::StartTimer() { … }
void MediaSinkServiceBase::OnDiscoveryComplete() { … }
}