#include "content/browser/renderer_host/p2p/socket_dispatcher_host.h"
#include <stddef.h>
#include <algorithm>
#include "base/containers/heap_array.h"
#include "base/functional/bind.h"
#include "content/browser/bad_message.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/storage_partition_impl.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "mojo/public/cpp/bindings/remote_set.h"
#include "net/base/net_errors.h"
#include "services/network/public/cpp/p2p_param_traits.h"
#include "services/network/public/mojom/network_context.mojom.h"
BrowserMessageFilter;
BrowserThread;
namespace content {
P2PSocketDispatcherHost::P2PSocketDispatcherHost(int render_process_id)
: … { … }
P2PSocketDispatcherHost::~P2PSocketDispatcherHost() = default;
void P2PSocketDispatcherHost::StartRtpDump(
bool incoming,
bool outgoing,
RenderProcessHost::WebRtcRtpPacketCallback packet_callback) { … }
void P2PSocketDispatcherHost::StopRtpDump(bool incoming, bool outgoing) { … }
void P2PSocketDispatcherHost::BindReceiver(
RenderProcessHostImpl& process,
mojo::PendingReceiver<network::mojom::P2PSocketManager> receiver,
net::NetworkAnonymizationKey anonymization_key,
const GlobalRenderFrameHostId& render_frame_host_id) { … }
void P2PSocketDispatcherHost::PauseSocketManagerForRenderFrameHost(
const GlobalRenderFrameHostId& frame_id) { … }
void P2PSocketDispatcherHost::ResumeSocketManagerForRenderFrameHost(
const GlobalRenderFrameHostId& frame_id) { … }
base::WeakPtr<P2PSocketDispatcherHost> P2PSocketDispatcherHost::GetWeakPtr() { … }
void P2PSocketDispatcherHost::InvalidSocketPortRangeRequested() { … }
void P2PSocketDispatcherHost::DumpPacket(
const std::vector<uint8_t>& packet_header,
uint64_t packet_length,
bool incoming) { … }
}