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

Side by Side Diff: talk/app/webrtc/peerconnectionfactoryproxy.h

Issue 1460043002: Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Restore the Pass methods Created 5 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 11 matching lines...) Expand all
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #ifndef TALK_APP_WEBRTC_PEERCONNECTIONFACTORYPROXY_H_ 28 #ifndef TALK_APP_WEBRTC_PEERCONNECTIONFACTORYPROXY_H_
29 #define TALK_APP_WEBRTC_PEERCONNECTIONFACTORYPROXY_H_ 29 #define TALK_APP_WEBRTC_PEERCONNECTIONFACTORYPROXY_H_
30 30
31 #include <string> 31 #include <string>
32 #include <utility>
32 33
33 #include "talk/app/webrtc/peerconnectioninterface.h" 34 #include "talk/app/webrtc/peerconnectioninterface.h"
34 #include "talk/app/webrtc/proxy.h" 35 #include "talk/app/webrtc/proxy.h"
35 #include "webrtc/base/bind.h" 36 #include "webrtc/base/bind.h"
36 37
37 namespace webrtc { 38 namespace webrtc {
38 39
39 BEGIN_PROXY_MAP(PeerConnectionFactory) 40 BEGIN_PROXY_MAP(PeerConnectionFactory)
40 PROXY_METHOD1(void, SetOptions, const Options&) 41 PROXY_METHOD1(void, SetOptions, const Options&)
41 // Can't use PROXY_METHOD5 because scoped_ptr must be Pass()ed. 42 // Can't use PROXY_METHOD5 because scoped_ptr must be moved.
42 // TODO(tommi,hbos): Use of templates to support scoped_ptr? 43 // TODO(tommi,hbos): Use of templates to support scoped_ptr?
43 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( 44 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection(
44 const PeerConnectionInterface::RTCConfiguration& a1, 45 const PeerConnectionInterface::RTCConfiguration& a1,
45 const MediaConstraintsInterface* a2, 46 const MediaConstraintsInterface* a2,
46 PortAllocatorFactoryInterface* a3, 47 PortAllocatorFactoryInterface* a3,
47 rtc::scoped_ptr<DtlsIdentityStoreInterface> a4, 48 rtc::scoped_ptr<DtlsIdentityStoreInterface> a4,
48 PeerConnectionObserver* a5) override { 49 PeerConnectionObserver* a5) override {
49 return owner_thread_->Invoke<rtc::scoped_refptr<PeerConnectionInterface>>( 50 return owner_thread_->Invoke<rtc::scoped_refptr<PeerConnectionInterface>>(
50 rtc::Bind(&PeerConnectionFactoryProxy::CreatePeerConnection_ot1, this, 51 rtc::Bind(&PeerConnectionFactoryProxy::CreatePeerConnection_ot1, this,
51 a1, a2, a3, a4.release(), a5)); 52 a1, a2, a3, a4.release(), a5));
(...skipping 25 matching lines...) Expand all
77 PROXY_METHOD0(void, StopRtcEventLog) 78 PROXY_METHOD0(void, StopRtcEventLog)
78 79
79 private: 80 private:
80 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_ot1( 81 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_ot1(
81 const PeerConnectionInterface::RTCConfiguration& a1, 82 const PeerConnectionInterface::RTCConfiguration& a1,
82 const MediaConstraintsInterface* a2, 83 const MediaConstraintsInterface* a2,
83 PortAllocatorFactoryInterface* a3, 84 PortAllocatorFactoryInterface* a3,
84 DtlsIdentityStoreInterface* a4, 85 DtlsIdentityStoreInterface* a4,
85 PeerConnectionObserver* a5) { 86 PeerConnectionObserver* a5) {
86 rtc::scoped_ptr<DtlsIdentityStoreInterface> ptr_a4(a4); 87 rtc::scoped_ptr<DtlsIdentityStoreInterface> ptr_a4(a4);
87 return c_->CreatePeerConnection(a1, a2, a3, ptr_a4.Pass(), a5); 88 return c_->CreatePeerConnection(a1, a2, a3, std::move(ptr_a4), a5);
88 } 89 }
89 90
90 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_ot2( 91 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_ot2(
91 const PeerConnectionInterface::RTCConfiguration& a1, 92 const PeerConnectionInterface::RTCConfiguration& a1,
92 const MediaConstraintsInterface* a2, 93 const MediaConstraintsInterface* a2,
93 cricket::PortAllocator* a3, 94 cricket::PortAllocator* a3,
94 DtlsIdentityStoreInterface* a4, 95 DtlsIdentityStoreInterface* a4,
95 PeerConnectionObserver* a5) { 96 PeerConnectionObserver* a5) {
96 rtc::scoped_ptr<cricket::PortAllocator> ptr_a3(a3); 97 rtc::scoped_ptr<cricket::PortAllocator> ptr_a3(a3);
97 rtc::scoped_ptr<DtlsIdentityStoreInterface> ptr_a4(a4); 98 rtc::scoped_ptr<DtlsIdentityStoreInterface> ptr_a4(a4);
98 return c_->CreatePeerConnection(a1, a2, ptr_a3.Pass(), ptr_a4.Pass(), a5); 99 return c_->CreatePeerConnection(a1, a2, std::move(ptr_a3),
100 std::move(ptr_a4), a5);
99 } 101 }
100 END_PROXY() 102 END_PROXY()
101 103
102 } // namespace webrtc 104 } // namespace webrtc
103 105
104 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORYPROXY_H_ 106 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORYPROXY_H_
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnectionfactory_unittest.cc ('k') | talk/app/webrtc/peerconnectioninterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698