#include "components/media_router/common/providers/cast/channel/cast_socket_service.h"
#include "base/memory/ptr_util.h"
#include "base/numerics/checked_math.h"
#include "base/observer_list.h"
#include "base/ranges/algorithm.h"
#include "components/media_router/common/providers/cast/channel/cast_socket.h"
#include "components/media_router/common/providers/cast/channel/logger.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
BrowserThread;
namespace cast_channel {
CastSocketService* CastSocketService::GetInstance() { … }
CastSocketService::CastSocketService()
: … { … }
CastSocketService::~CastSocketService() = default;
int CastSocketServiceImpl::last_channel_id_ = …;
CastSocketServiceImpl::CastSocketServiceImpl() = default;
CastSocketServiceImpl::~CastSocketServiceImpl() = default;
CastSocket* CastSocketServiceImpl::AddSocket(
std::unique_ptr<CastSocket> socket) { … }
std::unique_ptr<CastSocket> CastSocketServiceImpl::RemoveSocket(
int channel_id) { … }
void CastSocketService::CloseSocket(int channel_id) { … }
CastSocket* CastSocketServiceImpl::GetSocket(int channel_id) const { … }
CastSocket* CastSocketServiceImpl::GetSocket(
const net::IPEndPoint& ip_endpoint) const { … }
void CastSocketServiceImpl::OpenSocket(
network::NetworkContextGetter network_context_getter,
const CastSocketOpenParams& open_params,
CastSocket::OnOpenCallback open_cb) { … }
void CastSocketServiceImpl::AddObserver(CastSocket::Observer* observer) { … }
void CastSocketServiceImpl::RemoveObserver(CastSocket::Observer* observer) { … }
}