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

Side by Side Diff: third_party/WebKit/Source/platform/mediastream/RTCConfiguration.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 (C) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef RTCConfiguration_h 31 #ifndef RTCConfiguration_h
32 #define RTCConfiguration_h 32 #define RTCConfiguration_h
33 33
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.h"
35 #include "platform/weborigin/KURL.h" 35 #include "platform/weborigin/KURL.h"
36 #include "public/platform/WebRTCCertificate.h" 36 #include "public/platform/WebRTCCertificate.h"
37 #include "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
38 #include "wtf/PtrUtil.h"
39 #include "wtf/Vector.h" 38 #include "wtf/Vector.h"
40 #include "wtf/text/WTFString.h" 39 #include "wtf/text/WTFString.h"
41 #include <memory>
42 40
43 namespace blink { 41 namespace blink {
44 42
45 class RTCIceServer final : public GarbageCollectedFinalized<RTCIceServer> { 43 class RTCIceServer final : public GarbageCollectedFinalized<RTCIceServer> {
46 public: 44 public:
47 static RTCIceServer* create(const KURL& uri, const String& username, const S tring& credential) 45 static RTCIceServer* create(const KURL& uri, const String& username, const S tring& credential)
48 { 46 {
49 return new RTCIceServer(uri, username, credential); 47 return new RTCIceServer(uri, username, credential);
50 } 48 }
51 49
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 size_t numberOfServers() { return m_servers.size(); } 90 size_t numberOfServers() { return m_servers.size(); }
93 RTCIceServer* server(size_t index) { return m_servers[index].get(); } 91 RTCIceServer* server(size_t index) { return m_servers[index].get(); }
94 92
95 void setIceTransports(RTCIceTransports iceTransports) { m_iceTransports = ic eTransports; } 93 void setIceTransports(RTCIceTransports iceTransports) { m_iceTransports = ic eTransports; }
96 RTCIceTransports iceTransports() { return m_iceTransports; } 94 RTCIceTransports iceTransports() { return m_iceTransports; }
97 void setBundlePolicy(RTCBundlePolicy bundlePolicy) { m_bundlePolicy = bundle Policy; } 95 void setBundlePolicy(RTCBundlePolicy bundlePolicy) { m_bundlePolicy = bundle Policy; }
98 RTCBundlePolicy bundlePolicy() { return m_bundlePolicy; } 96 RTCBundlePolicy bundlePolicy() { return m_bundlePolicy; }
99 void setRtcpMuxPolicy(RTCRtcpMuxPolicy rtcpMuxPolicy) { m_rtcpMuxPolicy = rt cpMuxPolicy; } 97 void setRtcpMuxPolicy(RTCRtcpMuxPolicy rtcpMuxPolicy) { m_rtcpMuxPolicy = rt cpMuxPolicy; }
100 RTCRtcpMuxPolicy rtcpMuxPolicy() { return m_rtcpMuxPolicy; } 98 RTCRtcpMuxPolicy rtcpMuxPolicy() { return m_rtcpMuxPolicy; }
101 99
102 void appendCertificate(std::unique_ptr<WebRTCCertificate> certificate) { m_c ertificates.append(wrapUnique(certificate.release())); } 100 void appendCertificate(std::unique_ptr<WebRTCCertificate> certificate) { m_c ertificates.append(adoptPtr(certificate.release())); }
103 size_t numberOfCertificates() const { return m_certificates.size(); } 101 size_t numberOfCertificates() const { return m_certificates.size(); }
104 WebRTCCertificate* certificate(size_t index) const { return m_certificates[i ndex].get(); } 102 WebRTCCertificate* certificate(size_t index) const { return m_certificates[i ndex].get(); }
105 103
106 DEFINE_INLINE_TRACE() { visitor->trace(m_servers); } 104 DEFINE_INLINE_TRACE() { visitor->trace(m_servers); }
107 105
108 private: 106 private:
109 RTCConfiguration() : 107 RTCConfiguration() :
110 m_iceTransports(RTCIceTransportsAll), 108 m_iceTransports(RTCIceTransportsAll),
111 m_bundlePolicy(RTCBundlePolicyBalanced), 109 m_bundlePolicy(RTCBundlePolicyBalanced),
112 m_rtcpMuxPolicy(RTCRtcpMuxPolicyNegotiate) { } 110 m_rtcpMuxPolicy(RTCRtcpMuxPolicyNegotiate) { }
113 111
114 HeapVector<Member<RTCIceServer>> m_servers; 112 HeapVector<Member<RTCIceServer>> m_servers;
115 RTCIceTransports m_iceTransports; 113 RTCIceTransports m_iceTransports;
116 RTCBundlePolicy m_bundlePolicy; 114 RTCBundlePolicy m_bundlePolicy;
117 RTCRtcpMuxPolicy m_rtcpMuxPolicy; 115 RTCRtcpMuxPolicy m_rtcpMuxPolicy;
118 Vector<std::unique_ptr<WebRTCCertificate>> m_certificates; 116 Vector<OwnPtr<WebRTCCertificate>> m_certificates;
119 }; 117 };
120 118
121 } // namespace blink 119 } // namespace blink
122 120
123 #endif // RTCConfiguration_h 121 #endif // RTCConfiguration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698