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

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

Issue 1311853005: RTCCertificate and RTCPeerConnection.generateCertificate added to JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Merge with master Created 5 years, 3 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) 2012 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
11 * notice, this list of conditions and the following disclaimer 11 * notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the 12 * in the documentation and/or other materials provided with the
(...skipping 13 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
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 "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
37 #include "wtf/Vector.h" 38 #include "wtf/Vector.h"
38 #include "wtf/text/WTFString.h" 39 #include "wtf/text/WTFString.h"
39 40
40 namespace blink { 41 namespace blink {
41 42
42 class RTCIceServer final : public GarbageCollectedFinalized<RTCIceServer> { 43 class RTCIceServer final : public GarbageCollectedFinalized<RTCIceServer> {
43 public: 44 public:
44 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)
45 { 46 {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 RTCBundlePolicyBalanced, 93 RTCBundlePolicyBalanced,
93 RTCBundlePolicyMaxCompat, 94 RTCBundlePolicyMaxCompat,
94 RTCBundlePolicyMaxBundle 95 RTCBundlePolicyMaxBundle
95 }; 96 };
96 97
97 enum RTCRtcpMuxPolicy { 98 enum RTCRtcpMuxPolicy {
98 RTCRtcpMuxPolicyNegotiate, 99 RTCRtcpMuxPolicyNegotiate,
99 RTCRtcpMuxPolicyRequire 100 RTCRtcpMuxPolicyRequire
100 }; 101 };
101 102
102 class RTCConfiguration final : public GarbageCollected<RTCConfiguration> { 103 class PLATFORM_EXPORT RTCConfiguration final : public GarbageCollectedFinalized< RTCConfiguration> {
103 public: 104 public:
104 static RTCConfiguration* create() { return new RTCConfiguration(); } 105 static RTCConfiguration* create() { return new RTCConfiguration(); }
105 106
107 ~RTCConfiguration();
108
106 void setIceTransports(RTCIceTransports iceTransports) { m_iceTransports = ic eTransports; } 109 void setIceTransports(RTCIceTransports iceTransports) { m_iceTransports = ic eTransports; }
107 RTCIceTransports iceTransports() { return m_iceTransports; } 110 RTCIceTransports iceTransports() { return m_iceTransports; }
108 void setBundlePolicy(RTCBundlePolicy bundlePolicy) { m_bundlePolicy = bundle Policy; } 111 void setBundlePolicy(RTCBundlePolicy bundlePolicy) { m_bundlePolicy = bundle Policy; }
109 RTCBundlePolicy bundlePolicy() { return m_bundlePolicy; } 112 RTCBundlePolicy bundlePolicy() { return m_bundlePolicy; }
110 void setRtcpMuxPolicy(RTCRtcpMuxPolicy rtcpMuxPolicy) { m_rtcpMuxPolicy = rt cpMuxPolicy; } 113 void setRtcpMuxPolicy(RTCRtcpMuxPolicy rtcpMuxPolicy) { m_rtcpMuxPolicy = rt cpMuxPolicy; }
111 RTCRtcpMuxPolicy rtcpMuxPolicy() { return m_rtcpMuxPolicy; } 114 RTCRtcpMuxPolicy rtcpMuxPolicy() { return m_rtcpMuxPolicy; }
112 void setIceServers(RTCIceServerArray* iceServers) { m_iceServers = iceServer s; } 115 void setIceServers(RTCIceServerArray* iceServers) { m_iceServers = iceServer s; }
113 RTCIceServerArray* iceServers() { return m_iceServers.get(); } 116 RTCIceServerArray* iceServers() { return m_iceServers.get(); }
117 void appendCertificate(WebRTCCertificate* certificate) { m_certificates.appe nd(certificate); }
118 size_t numberOfCertificates() const { return m_certificates.size(); }
119 WebRTCCertificate* certificate(size_t index) const { return m_certificates[i ndex]; }
114 120
115 DEFINE_INLINE_TRACE() { visitor->trace(m_iceServers); } 121 DEFINE_INLINE_TRACE() { visitor->trace(m_iceServers); }
116 122
117 private: 123 private:
118 RTCConfiguration() 124 RTCConfiguration()
119 : m_iceTransports(RTCIceTransportsAll) 125 : m_iceTransports(RTCIceTransportsAll)
120 , m_bundlePolicy(RTCBundlePolicyBalanced) 126 , m_bundlePolicy(RTCBundlePolicyBalanced)
121 , m_rtcpMuxPolicy(RTCRtcpMuxPolicyNegotiate) 127 , m_rtcpMuxPolicy(RTCRtcpMuxPolicyNegotiate)
122 { 128 {
123 } 129 }
124 130
125 Member<RTCIceServerArray> m_iceServers; 131 Member<RTCIceServerArray> m_iceServers;
126 RTCIceTransports m_iceTransports; 132 RTCIceTransports m_iceTransports;
127 RTCBundlePolicy m_bundlePolicy; 133 RTCBundlePolicy m_bundlePolicy;
128 RTCRtcpMuxPolicy m_rtcpMuxPolicy; 134 RTCRtcpMuxPolicy m_rtcpMuxPolicy;
135 Vector<WebRTCCertificate*> m_certificates;
jochen (gone - plz use gerrit) 2015/09/22 15:48:53 why not Vector<OwnPtr<WebRTCCertificate>> ?
hbos_chromium 2015/09/28 08:10:16 Done.
129 }; 136 };
130 137
131 } // namespace blink 138 } // namespace blink
132 139
133 #endif // RTCConfiguration_h 140 #endif // RTCConfiguration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698