Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1688)

Unified Diff: Source/modules/mediastream/RTCDataChannel.cpp

Issue 16305017: Removes the old createDataChannel and starts to use the new one with WebRTCDataChannelInit (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/mediastream/RTCDataChannel.h ('k') | Source/modules/mediastream/RTCPeerConnection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediastream/RTCDataChannel.cpp
diff --git a/Source/modules/mediastream/RTCDataChannel.cpp b/Source/modules/mediastream/RTCDataChannel.cpp
index 4172ad20d85758baa67fbb86d44e49b6ef9a7649..38e64240a7e1b8ab4597dd6bb8a13a039f3c0728 100644
--- a/Source/modules/mediastream/RTCDataChannel.cpp
+++ b/Source/modules/mediastream/RTCDataChannel.cpp
@@ -38,9 +38,15 @@
namespace WebCore {
-PassRefPtr<RTCDataChannel> RTCDataChannel::create(ScriptExecutionContext* context, RTCPeerConnectionHandler* peerConnectionHandler, const String& label, bool reliable, ExceptionCode& ec)
+PassRefPtr<RTCDataChannel> RTCDataChannel::create(ScriptExecutionContext* context, PassOwnPtr<RTCDataChannelHandler> handler)
+{
+ ASSERT(handler);
+ return adoptRef(new RTCDataChannel(context, handler));
+}
+
+PassRefPtr<RTCDataChannel> RTCDataChannel::create(ScriptExecutionContext* context, RTCPeerConnectionHandler* peerConnectionHandler, const String& label, const WebKit::WebRTCDataChannelInit& init, ExceptionCode& ec)
{
- OwnPtr<RTCDataChannelHandler> handler = peerConnectionHandler->createDataChannel(label, reliable);
+ OwnPtr<RTCDataChannelHandler> handler = peerConnectionHandler->createDataChannel(label, init);
if (!handler) {
ec = NOT_SUPPORTED_ERR;
return 0;
@@ -48,12 +54,6 @@ PassRefPtr<RTCDataChannel> RTCDataChannel::create(ScriptExecutionContext* contex
return adoptRef(new RTCDataChannel(context, handler.release()));
}
-PassRefPtr<RTCDataChannel> RTCDataChannel::create(ScriptExecutionContext* context, PassOwnPtr<RTCDataChannelHandler> handler)
-{
- ASSERT(handler);
- return adoptRef(new RTCDataChannel(context, handler));
-}
-
RTCDataChannel::RTCDataChannel(ScriptExecutionContext* context, PassOwnPtr<RTCDataChannelHandler> handler)
: m_scriptExecutionContext(context)
, m_handler(handler)
« no previous file with comments | « Source/modules/mediastream/RTCDataChannel.h ('k') | Source/modules/mediastream/RTCPeerConnection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698