RTCPeerConnectionIceEvent.cpp [plain text]
#include "config.h"
#include "RTCPeerConnectionIceEvent.h"
#if ENABLE(WEB_RTC)
#include "EventNames.h"
#include "RTCIceCandidate.h"
namespace WebCore {
Ref<RTCPeerConnectionIceEvent> RTCPeerConnectionIceEvent::create(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&& candidate, String&& serverURL)
{
return adoptRef(*new RTCPeerConnectionIceEvent(eventNames().icecandidateEvent, canBubble, cancelable, WTFMove(candidate), WTFMove(serverURL)));
}
Ref<RTCPeerConnectionIceEvent> RTCPeerConnectionIceEvent::create(const AtomicString& type, Init&& init)
{
return adoptRef(*new RTCPeerConnectionIceEvent(type, init.bubbles, init.cancelable, WTFMove(init.candidate), WTFMove(init.url)));
}
RTCPeerConnectionIceEvent::RTCPeerConnectionIceEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&& candidate, String&& serverURL)
: Event(type, canBubble, cancelable)
, m_candidate(WTFMove(candidate))
, m_url(WTFMove(serverURL))
{
}
RTCPeerConnectionIceEvent::~RTCPeerConnectionIceEvent() = default;
RTCIceCandidate* RTCPeerConnectionIceEvent::candidate() const
{
return m_candidate.get();
}
EventInterface RTCPeerConnectionIceEvent::eventInterface() const
{
return RTCPeerConnectionIceEventInterfaceType;
}
}
#endif // ENABLE(WEB_RTC)