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 da93384f6a889aea18abf7a71153f7c2f97882ab..922a06438d6c996ff68643f62334978fc305ab41 100644 |
--- a/content/renderer/media/rtc_peer_connection_handler.cc |
+++ b/content/renderer/media/rtc_peer_connection_handler.cc |
@@ -30,6 +30,7 @@ |
#include "content/renderer/media/webrtc_audio_device_impl.h" |
#include "content/renderer/media/webrtc_uma_histograms.h" |
#include "content/renderer/render_thread_impl.h" |
+#include "content/renderer/render_view_impl.h" |
#include "third_party/WebKit/public/platform/WebMediaConstraints.h" |
#include "third_party/WebKit/public/platform/WebRTCConfiguration.h" |
#include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h" |
@@ -39,6 +40,7 @@ |
#include "third_party/WebKit/public/platform/WebRTCSessionDescriptionRequest.h" |
#include "third_party/WebKit/public/platform/WebRTCVoidRequest.h" |
#include "third_party/WebKit/public/platform/WebURL.h" |
+#include "third_party/WebKit/public/web/WebFrame.h" |
using webrtc::DataChannelInterface; |
using webrtc::IceCandidateInterface; |
@@ -736,6 +738,15 @@ void RTCPeerConnectionHandler::associateWithFrame(blink::WebFrame* frame) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
DCHECK(frame); |
frame_ = frame; |
+ |
+ // Copy the flag from Preference associated with this WebFrame. |
+ RenderViewImpl* renderer_view_impl = |
+ RenderViewImpl::FromWebView(frame_->view()); |
+ if (renderer_view_impl && dependency_factory_) { |
+ dependency_factory_->set_disable_multiple_routes( |
+ renderer_view_impl->renderer_preferences() |
+ .disable_webrtc_multiple_routes); |
+ } |
} |
bool RTCPeerConnectionHandler::initialize( |