#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom-params-data.h"
#include "third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom-import-headers.h"
#include "third_party/blink/public/mojom/peerconnection/peer_connection_tracker.mojom-test-utils.h"
namespace blink::mojom {
PeerConnectionInfo::PeerConnectionInfo()
: … { … }
PeerConnectionInfo::PeerConnectionInfo(
int32_t lid_in,
const std::string& rtc_configuration_in,
const std::optional<std::string>& url_in)
: … { … }
PeerConnectionInfo::~PeerConnectionInfo() = default;
void PeerConnectionInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PeerConnectionInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char PeerConnectionManager::Name_[] = …;
PeerConnectionManager::IPCStableHashFunction PeerConnectionManager::MessageToMethodInfo_(mojo::Message& message) { … }
const char* PeerConnectionManager::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PeerConnectionManager::OnSuspend_Sym::IPCStableHash() { … }
uint32_t PeerConnectionManager::OnThermalStateChange_Sym::IPCStableHash() { … }
uint32_t PeerConnectionManager::OnSpeedLimitChange_Sym::IPCStableHash() { … }
uint32_t PeerConnectionManager::StartEventLog_Sym::IPCStableHash() { … }
uint32_t PeerConnectionManager::StopEventLog_Sym::IPCStableHash() { … }
uint32_t PeerConnectionManager::GetStandardStats_Sym::IPCStableHash() { … }
uint32_t PeerConnectionManager::GetCurrentState_Sym::IPCStableHash() { … }
# endif
PeerConnectionManagerProxy::PeerConnectionManagerProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PeerConnectionManagerProxy::OnSuspend(
) { … }
void PeerConnectionManagerProxy::OnThermalStateChange(
DeviceThermalState in_thermal_state) { … }
void PeerConnectionManagerProxy::OnSpeedLimitChange(
int32_t in_speed_limit) { … }
void PeerConnectionManagerProxy::StartEventLog(
int32_t in_peer_connection_local_id, int32_t in_output_period_ms) { … }
void PeerConnectionManagerProxy::StopEventLog(
int32_t in_peer_connection_local_id) { … }
void PeerConnectionManagerProxy::GetStandardStats(
) { … }
void PeerConnectionManagerProxy::GetCurrentState(
) { … }
bool PeerConnectionManagerStubDispatch::Accept(
PeerConnectionManager* impl,
mojo::Message* message) { … }
bool PeerConnectionManagerStubDispatch::AcceptWithResponder(
PeerConnectionManager* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPeerConnectionManagerValidationInfo[] = …;
bool PeerConnectionManagerRequestValidator::Accept(mojo::Message* message) { … }
const char PeerConnectionTrackerHost::Name_[] = …;
PeerConnectionTrackerHost::IPCStableHashFunction PeerConnectionTrackerHost::MessageToMethodInfo_(mojo::Message& message) { … }
const char* PeerConnectionTrackerHost::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PeerConnectionTrackerHost::AddPeerConnection_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::RemovePeerConnection_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::UpdatePeerConnection_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::OnPeerConnectionSessionIdSet_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::GetUserMedia_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::GetUserMediaSuccess_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::GetUserMediaFailure_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::GetDisplayMedia_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::GetDisplayMediaSuccess_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::GetDisplayMediaFailure_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::WebRtcEventLogWrite_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::AddStandardStats_Sym::IPCStableHash() { … }
uint32_t PeerConnectionTrackerHost::AddLegacyStats_Sym::IPCStableHash() { … }
# endif
PeerConnectionTrackerHostProxy::PeerConnectionTrackerHostProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PeerConnectionTrackerHostProxy::AddPeerConnection(
PeerConnectionInfoPtr in_info) { … }
void PeerConnectionTrackerHostProxy::RemovePeerConnection(
int32_t in_lid) { … }
void PeerConnectionTrackerHostProxy::UpdatePeerConnection(
int32_t in_lid, const std::string& in_type, const std::string& in_value) { … }
void PeerConnectionTrackerHostProxy::OnPeerConnectionSessionIdSet(
int32_t in_lid, const std::string& in_session_id) { … }
void PeerConnectionTrackerHostProxy::GetUserMedia(
int32_t in_request_id, bool in_audio, bool in_video, const std::string& in_audio_constraints, const std::string& in_video_constraints) { … }
void PeerConnectionTrackerHostProxy::GetUserMediaSuccess(
int32_t in_request_id, const std::string& in_stream_id, const std::string& in_audio_track_info, const std::string& in_video_track_info) { … }
void PeerConnectionTrackerHostProxy::GetUserMediaFailure(
int32_t in_request_id, const std::string& in_error, const std::string& in_error_message) { … }
void PeerConnectionTrackerHostProxy::GetDisplayMedia(
int32_t in_request_id, bool in_audio, bool in_video, const std::string& in_audio_constraints, const std::string& in_video_constraints) { … }
void PeerConnectionTrackerHostProxy::GetDisplayMediaSuccess(
int32_t in_request_id, const std::string& in_stream_id, const std::string& in_audio_track_info, const std::string& in_video_track_info) { … }
void PeerConnectionTrackerHostProxy::GetDisplayMediaFailure(
int32_t in_request_id, const std::string& in_error, const std::string& in_error_message) { … }
void PeerConnectionTrackerHostProxy::WebRtcEventLogWrite(
int32_t in_lid, const std::vector<uint8_t>& in_output) { … }
void PeerConnectionTrackerHostProxy::AddStandardStats(
int32_t in_lid, ::base::Value::List in_value) { … }
void PeerConnectionTrackerHostProxy::AddLegacyStats(
int32_t in_lid, ::base::Value::List in_value) { … }
bool PeerConnectionTrackerHostStubDispatch::Accept(
PeerConnectionTrackerHost* impl,
mojo::Message* message) { … }
bool PeerConnectionTrackerHostStubDispatch::AcceptWithResponder(
PeerConnectionTrackerHost* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPeerConnectionTrackerHostValidationInfo[] = …;
bool PeerConnectionTrackerHostRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::PeerConnectionInfo::DataView, ::blink::mojom::PeerConnectionInfoPtr>::Read(
::blink::mojom::PeerConnectionInfo::DataView input,
::blink::mojom::PeerConnectionInfoPtr* output) { … }
}
namespace blink::mojom {
void PeerConnectionManagerInterceptorForTesting::OnSuspend() { … }
void PeerConnectionManagerInterceptorForTesting::OnThermalStateChange(DeviceThermalState thermal_state) { … }
void PeerConnectionManagerInterceptorForTesting::OnSpeedLimitChange(int32_t speed_limit) { … }
void PeerConnectionManagerInterceptorForTesting::StartEventLog(int32_t peer_connection_local_id, int32_t output_period_ms) { … }
void PeerConnectionManagerInterceptorForTesting::StopEventLog(int32_t peer_connection_local_id) { … }
void PeerConnectionManagerInterceptorForTesting::GetStandardStats() { … }
void PeerConnectionManagerInterceptorForTesting::GetCurrentState() { … }
PeerConnectionManagerAsyncWaiter::PeerConnectionManagerAsyncWaiter(
PeerConnectionManager* proxy) : … { … }
PeerConnectionManagerAsyncWaiter::~PeerConnectionManagerAsyncWaiter() = default;
void PeerConnectionTrackerHostInterceptorForTesting::AddPeerConnection(PeerConnectionInfoPtr info) { … }
void PeerConnectionTrackerHostInterceptorForTesting::RemovePeerConnection(int32_t lid) { … }
void PeerConnectionTrackerHostInterceptorForTesting::UpdatePeerConnection(int32_t lid, const std::string& type, const std::string& value) { … }
void PeerConnectionTrackerHostInterceptorForTesting::OnPeerConnectionSessionIdSet(int32_t lid, const std::string& session_id) { … }
void PeerConnectionTrackerHostInterceptorForTesting::GetUserMedia(int32_t request_id, bool audio, bool video, const std::string& audio_constraints, const std::string& video_constraints) { … }
void PeerConnectionTrackerHostInterceptorForTesting::GetUserMediaSuccess(int32_t request_id, const std::string& stream_id, const std::string& audio_track_info, const std::string& video_track_info) { … }
void PeerConnectionTrackerHostInterceptorForTesting::GetUserMediaFailure(int32_t request_id, const std::string& error, const std::string& error_message) { … }
void PeerConnectionTrackerHostInterceptorForTesting::GetDisplayMedia(int32_t request_id, bool audio, bool video, const std::string& audio_constraints, const std::string& video_constraints) { … }
void PeerConnectionTrackerHostInterceptorForTesting::GetDisplayMediaSuccess(int32_t request_id, const std::string& stream_id, const std::string& audio_track_info, const std::string& video_track_info) { … }
void PeerConnectionTrackerHostInterceptorForTesting::GetDisplayMediaFailure(int32_t request_id, const std::string& error, const std::string& error_message) { … }
void PeerConnectionTrackerHostInterceptorForTesting::WebRtcEventLogWrite(int32_t lid, const std::vector<uint8_t>& output) { … }
void PeerConnectionTrackerHostInterceptorForTesting::AddStandardStats(int32_t lid, ::base::Value::List value) { … }
void PeerConnectionTrackerHostInterceptorForTesting::AddLegacyStats(int32_t lid, ::base::Value::List value) { … }
PeerConnectionTrackerHostAsyncWaiter::PeerConnectionTrackerHostAsyncWaiter(
PeerConnectionTrackerHost* proxy) : … { … }
PeerConnectionTrackerHostAsyncWaiter::~PeerConnectionTrackerHostAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif