summaryrefslogtreecommitdiff
path: root/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp')
-rw-r--r--Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp31
1 files changed, 8 insertions, 23 deletions
diff --git a/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp b/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp
index 136581384..17f81aa34 100644
--- a/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp
+++ b/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp
@@ -25,41 +25,26 @@
#include "config.h"
#include "RTCDataChannelEvent.h"
-#if ENABLE(MEDIA_STREAM)
+#if ENABLE(WEB_RTC)
-#include "EventNames.h"
#include "RTCDataChannel.h"
namespace WebCore {
-PassRefPtr<RTCDataChannelEvent> RTCDataChannelEvent::create()
+Ref<RTCDataChannelEvent> RTCDataChannelEvent::create(const AtomicString& type, bool canBubble, bool cancelable, Ref<RTCDataChannel>&& channel)
{
- return adoptRef(new RTCDataChannelEvent);
+ return adoptRef(*new RTCDataChannelEvent(type, canBubble, cancelable, WTFMove(channel)));
}
-PassRefPtr<RTCDataChannelEvent> RTCDataChannelEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<RTCDataChannel> channel)
-{
- return adoptRef(new RTCDataChannelEvent(type, canBubble, cancelable, channel));
-}
-
-
-RTCDataChannelEvent::RTCDataChannelEvent()
-{
-}
-
-RTCDataChannelEvent::RTCDataChannelEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<RTCDataChannel> channel)
+RTCDataChannelEvent::RTCDataChannelEvent(const AtomicString& type, bool canBubble, bool cancelable, Ref<RTCDataChannel>&& channel)
: Event(type, canBubble, cancelable)
- , m_channel(channel)
-{
-}
-
-RTCDataChannelEvent::~RTCDataChannelEvent()
+ , m_channel(WTFMove(channel))
{
}
-RTCDataChannel* RTCDataChannelEvent::channel() const
+RTCDataChannel* RTCDataChannelEvent::channel()
{
- return m_channel.get();
+ return m_channel.ptr();
}
EventInterface RTCDataChannelEvent::eventInterface() const
@@ -69,5 +54,5 @@ EventInterface RTCDataChannelEvent::eventInterface() const
} // namespace WebCore
-#endif // ENABLE(MEDIA_STREAM)
+#endif // ENABLE(WEB_RTC)