Chromium Code Reviews| Index: content/renderer/media/rtc_peer_connection_handler.cc |
| diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc |
| index 30707cac02a2f3df08cf80fd2f40687182daf9b8..98cb5c8b2494b4d2a9ccd8e83e5ea7ed6d0c3ca2 100644 |
| --- a/content/renderer/media/rtc_peer_connection_handler.cc |
| +++ b/content/renderer/media/rtc_peer_connection_handler.cc |
| @@ -8,10 +8,12 @@ |
| #include <utility> |
| #include <vector> |
| +#include "base/command_line.h" |
| #include "base/logging.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/stl_util.h" |
| #include "base/utf_string_conversions.h" |
| +#include "content/public/common/content_switches.h" |
| #include "content/renderer/media/media_stream_dependency_factory.h" |
| #include "content/renderer/media/peer_connection_tracker.h" |
| #include "content/renderer/media/remote_media_stream_impl.h" |
| @@ -338,6 +340,9 @@ bool RTCPeerConnectionHandler::initialize( |
| const WebKit::WebRTCConfiguration& server_configuration, |
| const WebKit::WebMediaConstraints& options) { |
| DCHECK(frame_); |
| + static bool sctp_data_channel_enabled = |
|
tommi (sloooow) - chröme
2013/05/21 08:03:24
nit: no need to cache this in a static. initialize
jiayl
2013/05/21 16:57:15
Done.
|
| + CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableSCTPDataChannels); |
| peer_connection_tracker_ = |
| RenderThreadImpl::current()->peer_connection_tracker(); |
| @@ -346,6 +351,14 @@ bool RTCPeerConnectionHandler::initialize( |
| GetNativeIceServers(server_configuration, &servers); |
| RTCMediaConstraints constraints(options); |
| + |
| + if (sctp_data_channel_enabled) { |
| + // TODO(jiayl): replace the hard coded string with |
| + // webrtc::MediaConstraintsInterface::kEnbaleSctpDataChannels when |
|
tommi (sloooow) - chröme
2013/05/21 08:03:24
s/kEnbale/kEnable
jiayl
2013/05/21 16:57:15
Done.
|
| + // the Libjingle change is rolled. |
|
tommi (sloooow) - chröme
2013/05/21 08:03:24
when will the libjingle change be rolled? Could w
jiayl
2013/05/21 16:57:15
The libjingle CL adding these strings depends on a
|
| + constraints.AddOptional("internalSctpDataChannels", "true"); |
| + } |
| + |
| native_peer_connection_ = |
| dependency_factory_->CreatePeerConnection( |
| servers, &constraints, frame_, this); |