Chromium Code Reviews| Index: talk/app/webrtc/peerconnectionfactoryproxy.h |
| diff --git a/talk/app/webrtc/peerconnectionfactoryproxy.h b/talk/app/webrtc/peerconnectionfactoryproxy.h |
| index 2f5ddd68924e8c7ad5574cb15174032b2f1cbd2e..5c0da53fb904f0685da2ee7cb13a8d23ce6e0de1 100644 |
| --- a/talk/app/webrtc/peerconnectionfactoryproxy.h |
| +++ b/talk/app/webrtc/peerconnectionfactoryproxy.h |
| @@ -32,18 +32,23 @@ |
| #include "talk/app/webrtc/peerconnectioninterface.h" |
| #include "talk/app/webrtc/proxy.h" |
| +#include "webrtc/base/bind.h" |
| namespace webrtc { |
| BEGIN_PROXY_MAP(PeerConnectionFactory) |
| PROXY_METHOD1(void, SetOptions, const Options&) |
| - PROXY_METHOD5(rtc::scoped_refptr<PeerConnectionInterface>, |
| - CreatePeerConnection, |
| - const PeerConnectionInterface::RTCConfiguration&, |
| - const MediaConstraintsInterface*, |
| - PortAllocatorFactoryInterface*, |
| - DTLSIdentityServiceInterface*, |
| - PeerConnectionObserver*) |
| + // Can't use PROXY_METHOD5 because scoped_ptr must be Pass()ed. |
| + rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| + const PeerConnectionInterface::RTCConfiguration& a1, |
| + const MediaConstraintsInterface* a2, |
| + PortAllocatorFactoryInterface* a3, |
| + rtc::scoped_ptr<DtlsIdentityStoreInterface> a4, |
| + PeerConnectionObserver* a5) override { |
| + return owner_thread_->Invoke<rtc::scoped_refptr<PeerConnectionInterface>>( |
| + rtc::Bind(&PeerConnectionFactoryProxy::CreatePeerConnection_ot, this, |
| + a1, a2, a3, a4.release(), a5)); |
| + } |
| PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>, |
| CreateLocalMediaStream, const std::string&) |
| PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>, |
| @@ -56,6 +61,17 @@ BEGIN_PROXY_MAP(PeerConnectionFactory) |
| PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>, |
| CreateAudioTrack, const std::string&, AudioSourceInterface*) |
| PROXY_METHOD1(bool, StartAecDump, rtc::PlatformFile) |
| + |
| + private: |
| + rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_ot( |
|
tommi
2015/06/18 13:55:36
Since you're overriding this method, you might as
|
| + const PeerConnectionInterface::RTCConfiguration& a1, |
| + const MediaConstraintsInterface* a2, |
| + PortAllocatorFactoryInterface* a3, |
| + DtlsIdentityStoreInterface* a4, |
| + PeerConnectionObserver* a5) { |
| + rtc::scoped_ptr<DtlsIdentityStoreInterface> ptr_a4(a4); |
| + return c_->CreatePeerConnection(a1, a2, a3, ptr_a4.Pass(), a5); |
| + } |
| END_PROXY() |
| } // namespace webrtc |