diff options
Diffstat (limited to 'content')
10 files changed, 33 insertions, 21 deletions
diff --git a/content/renderer/media/media_stream_dependency_factory.cc b/content/renderer/media/media_stream_dependency_factory.cc index c67e858..00001b9 100644 --- a/content/renderer/media/media_stream_dependency_factory.cc +++ b/content/renderer/media/media_stream_dependency_factory.cc @@ -13,7 +13,6 @@ #include "content/renderer/p2p/ipc_socket_factory.h" #include "content/renderer/p2p/port_allocator.h" #include "jingle/glue/thread_wrapper.h" -#include "third_party/libjingle/source/talk/app/webrtc/peerconnection.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" class P2PPortAllocatorFactory : public webrtc::PortAllocatorFactoryInterface { diff --git a/content/renderer/media/media_stream_dependency_factory.h b/content/renderer/media/media_stream_dependency_factory.h index 57d9b3c..e632aa3 100644 --- a/content/renderer/media/media_stream_dependency_factory.h +++ b/content/renderer/media/media_stream_dependency_factory.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "content/common/content_export.h" -#include "third_party/libjingle/source/talk/app/webrtc/peerconnection.h" +#include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h" #include "webkit/glue/p2p_transport.h" namespace content { diff --git a/content/renderer/media/mock_media_stream_dependency_factory.cc b/content/renderer/media/mock_media_stream_dependency_factory.cc index 9810b3a..47af829 100644 --- a/content/renderer/media/mock_media_stream_dependency_factory.cc +++ b/content/renderer/media/mock_media_stream_dependency_factory.cc @@ -185,11 +185,12 @@ class MockSessionDescription : public SessionDescriptionInterface { NOTIMPLEMENTED(); return 0; } - virtual const IceCandidateColletion* candidates( + virtual const IceCandidateCollection* candidates( size_t mediasection_index) const OVERRIDE { NOTIMPLEMENTED(); return NULL; } + virtual bool ToString(std::string* out) const OVERRIDE { *out = sdp_; return true; diff --git a/content/renderer/media/mock_peer_connection_impl.h b/content/renderer/media/mock_peer_connection_impl.h index 6615acc..9b61747 100644 --- a/content/renderer/media/mock_peer_connection_impl.h +++ b/content/renderer/media/mock_peer_connection_impl.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" -#include "third_party/libjingle/source/talk/app/webrtc/peerconnection.h" +#include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h" class MockMediaStreamDependencyFactory; diff --git a/content/renderer/media/peer_connection_handler_base.h b/content/renderer/media/peer_connection_handler_base.h index de7935d..87cff04 100644 --- a/content/renderer/media/peer_connection_handler_base.h +++ b/content/renderer/media/peer_connection_handler_base.h @@ -12,7 +12,7 @@ #include "base/message_loop_proxy.h" #include "content/common/content_export.h" #include "third_party/libjingle/source/talk/app/webrtc/mediastream.h" -#include "third_party/libjingle/source/talk/app/webrtc/peerconnection.h" +#include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStreamDescriptor.h" class MediaStreamDependencyFactory; diff --git a/content/renderer/media/peer_connection_handler_jsep_unittest.cc b/content/renderer/media/peer_connection_handler_jsep_unittest.cc index b7b04f6..be2e3b2 100644 --- a/content/renderer/media/peer_connection_handler_jsep_unittest.cc +++ b/content/renderer/media/peer_connection_handler_jsep_unittest.cc @@ -12,7 +12,7 @@ #include "content/renderer/media/mock_peer_connection_impl.h" #include "content/renderer/media/peer_connection_handler_jsep.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/libjingle/source/talk/app/webrtc/peerconnection.h" +#include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebICECandidateDescriptor.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebICEOptions.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaHints.h" diff --git a/content/renderer/media/peer_connection_handler_unittest.cc b/content/renderer/media/peer_connection_handler_unittest.cc index a8b877b..3f1c998 100644 --- a/content/renderer/media/peer_connection_handler_unittest.cc +++ b/content/renderer/media/peer_connection_handler_unittest.cc @@ -15,7 +15,7 @@ #include "content/renderer/media/rtc_video_decoder.h" #include "jingle/glue/thread_wrapper.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/libjingle/source/talk/app/webrtc/peerconnection.h" +#include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStreamDescriptor.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStreamSource.h" diff --git a/content/renderer/p2p/p2p_transport_impl.cc b/content/renderer/p2p/p2p_transport_impl.cc index 9a67e67..7a13997 100644 --- a/content/renderer/p2p/p2p_transport_impl.cc +++ b/content/renderer/p2p/p2p_transport_impl.cc @@ -12,6 +12,8 @@ #include "jingle/glue/thread_wrapper.h" #include "jingle/glue/utils.h" #include "net/base/net_errors.h" +#include "third_party/libjingle/source/talk/base/helpers.h" +#include "third_party/libjingle/source/talk/p2p/base/constants.h" #include "third_party/libjingle/source/talk/p2p/base/p2ptransportchannel.h" #include "third_party/libjingle/source/talk/p2p/client/basicportallocator.h" @@ -75,7 +77,10 @@ bool P2PTransportImpl::Init(WebKit::WebFrame* web_frame, DCHECK(!channel_.get()); channel_.reset(new cricket::P2PTransportChannel( - name, 0, NULL, allocator_.get())); + 0, NULL, allocator_.get())); + channel_->SetIceUfrag( + talk_base::CreateRandomString(cricket::ICE_UFRAG_LENGTH)); + channel_->SetIcePwd(talk_base::CreateRandomString(cricket::ICE_PWD_LENGTH)); channel_->SignalRequestSignaling.connect( this, &P2PTransportImpl::OnRequestSignaling); channel_->SignalCandidateReady.connect( diff --git a/content/renderer/p2p/port_allocator.cc b/content/renderer/p2p/port_allocator.cc index 610f61b..a85c92d 100644 --- a/content/renderer/p2p/port_allocator.cc +++ b/content/renderer/p2p/port_allocator.cc @@ -70,17 +70,22 @@ P2PPortAllocator::P2PPortAllocator( P2PPortAllocator::~P2PPortAllocator() { } -cricket::PortAllocatorSession* P2PPortAllocator::CreateSession( - const std::string& channel_name, - int component) { - return new P2PPortAllocatorSession(this, channel_name, component); +cricket::PortAllocatorSession* P2PPortAllocator::CreateSessionInternal( + int component, + const std::string& ice_username_fragment, + const std::string& ice_password) { + return new P2PPortAllocatorSession( + this, component, ice_username_fragment, ice_password); } P2PPortAllocatorSession::P2PPortAllocatorSession( P2PPortAllocator* allocator, - const std::string& channel_name, - int component) - : cricket::BasicPortAllocatorSession(allocator, channel_name, component), + int component, + const std::string& ice_username_fragment, + const std::string& ice_password) + : cricket::BasicPortAllocatorSession( + allocator, component, + ice_username_fragment, ice_password), allocator_(allocator), relay_session_attempts_(0), relay_udp_port_(0), @@ -221,7 +226,7 @@ void P2PPortAllocatorSession::AllocateRelaySession() { WebString::fromUTF8("X-Google-Relay-Auth"), WebString::fromUTF8(allocator_->config_.relay_password)); request.addHTTPHeaderField(WebString::fromUTF8("X-Stream-Type"), - WebString::fromUTF8(channel_name())); + WebString::fromUTF8("chromoting")); relay_session_request_->loadAsynchronously(request, this); } diff --git a/content/renderer/p2p/port_allocator.h b/content/renderer/p2p/port_allocator.h index ab0198d..5aa34db 100644 --- a/content/renderer/p2p/port_allocator.h +++ b/content/renderer/p2p/port_allocator.h @@ -34,9 +34,10 @@ class P2PPortAllocator : public cricket::BasicPortAllocator { const webkit_glue::P2PTransport::Config& config); virtual ~P2PPortAllocator(); - virtual cricket::PortAllocatorSession* CreateSession( - const std::string& channel_name, - int component) OVERRIDE; + virtual cricket::PortAllocatorSession* CreateSessionInternal( + int component, + const std::string& ice_username_fragment, + const std::string& ice_password) OVERRIDE; private: friend class P2PPortAllocatorSession; @@ -53,8 +54,9 @@ class P2PPortAllocatorSession : public cricket::BasicPortAllocatorSession, public: P2PPortAllocatorSession( P2PPortAllocator* allocator, - const std::string& channel_name, - int candidate); + int component, + const std::string& ice_username_fragment, + const std::string& ice_password); virtual ~P2PPortAllocatorSession(); // WebKit::WebURLLoaderClient overrides. |