#include "chrome/browser/media/router/mojo/media_sink_service_status.h"
#include "base/json/json_string_value_serializer.h"
#include "base/strings/strcat.h"
#include "components/media_router/browser/log_util.h"
namespace media_router {
namespace {
constexpr size_t kMaxAvailableSinksSize = …;
std::string ToJSONString(const base::Value::Dict& value) { … }
base::Value::Dict ToValue(const MediaSinkInternal& sink_internal) { … }
base::Value::Dict ConvertDiscoveredSinksToValues(
const base::flat_map<std::string, std::vector<MediaSinkInternal>>& sinks) { … }
base::Value::Dict ConvertAvailableSinksToValues(
const base::LRUCache<std::string, std::vector<MediaSinkInternal>>&
available_sinks) { … }
}
MediaSinkServiceStatus::MediaSinkServiceStatus()
: … { … }
MediaSinkServiceStatus::~MediaSinkServiceStatus() = default;
void MediaSinkServiceStatus::UpdateDiscoveredSinks(
const std::string& provider_name,
const std::vector<MediaSinkInternal>& discovered_sinks) { … }
void MediaSinkServiceStatus::UpdateAvailableSinks(
mojom::MediaRouteProviderId provider_id,
const std::string& media_source,
const std::vector<MediaSinkInternal>& available_sinks) { … }
base::Value::Dict MediaSinkServiceStatus::GetStatusAsValue() const { … }
std::string MediaSinkServiceStatus::GetStatusAsJSONString() const { … }
}