#include "components/media_router/common/providers/cast/channel/keep_alive_delegate.h"
#include <string>
#include <utility>
#include "base/functional/bind.h"
#include "components/media_router/common/providers/cast/channel/cast_channel_enum.h"
#include "components/media_router/common/providers/cast/channel/cast_socket.h"
#include "components/media_router/common/providers/cast/channel/logger.h"
#include "net/base/net_errors.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "third_party/openscreen/src/cast/common/channel/proto/cast_channel.pb.h"
namespace cast_channel {
KeepAliveDelegate::KeepAliveDelegate(
CastSocket* socket,
scoped_refptr<Logger> logger,
std::unique_ptr<CastTransport::Delegate> inner_delegate,
base::TimeDelta ping_interval,
base::TimeDelta liveness_timeout)
: … { … }
KeepAliveDelegate::~KeepAliveDelegate() = default;
void KeepAliveDelegate::SetTimersForTest(
std::unique_ptr<base::RetainingOneShotTimer> injected_ping_timer,
std::unique_ptr<base::RetainingOneShotTimer> injected_liveness_timer) { … }
void KeepAliveDelegate::Start() { … }
void KeepAliveDelegate::OnError(ChannelError error_state) { … }
void KeepAliveDelegate::OnMessage(const CastMessage& message) { … }
}