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

Side by Side Diff: webrtc/api/peerconnectionfactoryproxy.h

Issue 2628343003: Adding some features to proxy.h, and restructuring the macros. (Closed)
Patch Set: Created 3 years, 11 months 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 * Copyright 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ 11 #ifndef WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_
12 #define WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ 12 #define WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_
13 13
14 #include <memory> 14 #include <memory>
15 #include <string> 15 #include <string>
16 #include <utility> 16 #include <utility>
17 17
18 #include "webrtc/api/peerconnectioninterface.h" 18 #include "webrtc/api/peerconnectioninterface.h"
19 #include "webrtc/api/proxy.h" 19 #include "webrtc/api/proxy.h"
20 #include "webrtc/base/bind.h" 20 #include "webrtc/base/bind.h"
21 21
22 namespace webrtc { 22 namespace webrtc {
23 23
24 BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory) 24 BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory)
25 PROXY_SIGNALING_THREAD_DESTRUCTOR()
25 PROXY_METHOD1(void, SetOptions, const Options&) 26 PROXY_METHOD1(void, SetOptions, const Options&)
26 // Can't use PROXY_METHOD5 because unique_ptr must be moved. 27 // Can't use PROXY_METHOD5 because unique_ptr must be moved.
27 // TODO(tommi,hbos): Use of templates to support unique_ptr? 28 // TODO(tommi,hbos): Use of templates to support unique_ptr?
28 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( 29 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection(
29 const PeerConnectionInterface::RTCConfiguration& a1, 30 const PeerConnectionInterface::RTCConfiguration& a1,
30 const MediaConstraintsInterface* a2, 31 const MediaConstraintsInterface* a2,
31 std::unique_ptr<cricket::PortAllocator> a3, 32 std::unique_ptr<cricket::PortAllocator> a3,
32 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> a4, 33 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> a4,
33 PeerConnectionObserver* a5) override { 34 PeerConnectionObserver* a5) override {
34 return signaling_thread_ 35 return signaling_thread_
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_ot( 93 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_ot(
93 const PeerConnectionInterface::RTCConfiguration& a1, 94 const PeerConnectionInterface::RTCConfiguration& a1,
94 cricket::PortAllocator* a3, 95 cricket::PortAllocator* a3,
95 rtc::RTCCertificateGeneratorInterface* a4, 96 rtc::RTCCertificateGeneratorInterface* a4,
96 PeerConnectionObserver* a5) { 97 PeerConnectionObserver* a5) {
97 std::unique_ptr<cricket::PortAllocator> ptr_a3(a3); 98 std::unique_ptr<cricket::PortAllocator> ptr_a3(a3);
98 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> ptr_a4(a4); 99 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> ptr_a4(a4);
99 return c_->CreatePeerConnection(a1, std::move(ptr_a3), std::move(ptr_a4), 100 return c_->CreatePeerConnection(a1, std::move(ptr_a3), std::move(ptr_a4),
100 a5); 101 a5);
101 } 102 }
102 END_SIGNALING_PROXY() 103 END_PROXY_MAP()
pthatcher1 2017/01/17 19:44:00 It seems like the end should match the begin. So
Taylor Brandstetter 2017/01/18 01:17:14 I don't see much benefit to that. Plus, code would
103 104
104 } // namespace webrtc 105 } // namespace webrtc
105 106
106 #endif // WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ 107 #endif // WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698