LibWebRTCProvider.cpp [plain text]
#include "config.h"
#include "LibWebRTCProvider.h"
#if USE(LIBWEBRTC)
#include "LibWebRTCNetwork.h"
#include "WebProcess.h"
#include <webrtc/pc/peerconnectionfactory.h>
using namespace WebCore;
namespace WebKit {
rtc::scoped_refptr<webrtc::PeerConnectionInterface> LibWebRTCProvider::createPeerConnection(webrtc::PeerConnectionObserver& observer, webrtc::PeerConnectionInterface::RTCConfiguration&& configuration)
{
return WebCore::LibWebRTCProvider::createPeerConnection(observer, WebProcess::singleton().libWebRTCNetwork().monitor(), WebProcess::singleton().libWebRTCNetwork().socketFactory(), WTFMove(configuration));
}
void LibWebRTCProvider::disableNonLocalhostConnections()
{
WebProcess::singleton().libWebRTCNetwork().disableNonLocalhostConnections();
}
void LibWebRTCProvider::unregisterMDNSNames(uint64_t documentIdentifier)
{
WebProcess::singleton().libWebRTCNetwork().mdnsRegister().unregisterMDNSNames(documentIdentifier);
}
void LibWebRTCProvider::registerMDNSName(PAL::SessionID sessionID, uint64_t documentIdentifier, const String& ipAddress, CompletionHandler<void(MDNSNameOrError&&)>&& callback)
{
WebProcess::singleton().libWebRTCNetwork().mdnsRegister().registerMDNSName(sessionID, documentIdentifier, ipAddress, WTFMove(callback));
}
void LibWebRTCProvider::resolveMDNSName(PAL::SessionID sessionID, const String& name, CompletionHandler<void(IPAddressOrError&&)>&& callback)
{
WebProcess::singleton().libWebRTCNetwork().mdnsRegister().resolveMDNSName(sessionID, name, WTFMove(callback));
}
}
#endif // USE(LIBWEBRTC)