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

Unified Diff: Source/platform/mediastream/RTCConfiguration.h

Issue 1315413004: Enable generation of local host candidate. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/mediastream/RTCConfiguration.h
diff --git a/Source/platform/mediastream/RTCConfiguration.h b/Source/platform/mediastream/RTCConfiguration.h
index e64b7f40a7995e18667ee795ae849f4706ed6522..157d5343fe79c2c01b2567345350004b961684c2 100644
--- a/Source/platform/mediastream/RTCConfiguration.h
+++ b/Source/platform/mediastream/RTCConfiguration.h
@@ -65,6 +65,23 @@ private:
String m_credential;
};
+class RTCIceServerArray final : public GarbageCollectedFinalized<RTCIceServerArray> {
+public:
+ static RTCIceServerArray* create()
+ {
+ return new RTCIceServerArray();
+ }
+
+ void appendServer(RTCIceServer* server) { m_servers.append(server); }
+ size_t numberOfServers() { return m_servers.size(); }
+ RTCIceServer* server(size_t index) { return m_servers[index].get(); }
+
+ DEFINE_INLINE_TRACE() { visitor->trace(m_servers); }
+
+private:
+ HeapVector<Member<RTCIceServer>> m_servers;
+};
+
enum RTCIceTransports {
RTCIceTransportsNone,
RTCIceTransportsRelay,
@@ -86,25 +103,26 @@ class RTCConfiguration final : public GarbageCollected<RTCConfiguration> {
public:
static RTCConfiguration* create() { return new RTCConfiguration(); }
- void appendServer(RTCIceServer* server) { m_servers.append(server); }
- size_t numberOfServers() { return m_servers.size(); }
- RTCIceServer* server(size_t index) { return m_servers[index].get(); }
void setIceTransports(RTCIceTransports iceTransports) { m_iceTransports = iceTransports; }
RTCIceTransports iceTransports() { return m_iceTransports; }
void setBundlePolicy(RTCBundlePolicy bundlePolicy) { m_bundlePolicy = bundlePolicy; }
RTCBundlePolicy bundlePolicy() { return m_bundlePolicy; }
void setRtcpMuxPolicy(RTCRtcpMuxPolicy rtcpMuxPolicy) { m_rtcpMuxPolicy = rtcpMuxPolicy; }
RTCRtcpMuxPolicy rtcpMuxPolicy() { return m_rtcpMuxPolicy; }
+ void setIceServers(RTCIceServerArray* iceServers) { m_iceServers = iceServers; }
+ RTCIceServerArray* iceServers() { return m_iceServers.get(); }
- DEFINE_INLINE_TRACE() { visitor->trace(m_servers); }
+ DEFINE_INLINE_TRACE() { visitor->trace(m_iceServers); }
private:
- RTCConfiguration() :
- m_iceTransports(RTCIceTransportsAll),
- m_bundlePolicy(RTCBundlePolicyBalanced),
- m_rtcpMuxPolicy(RTCRtcpMuxPolicyNegotiate) { }
+ RTCConfiguration()
+ : m_iceTransports(RTCIceTransportsAll)
+ , m_bundlePolicy(RTCBundlePolicyBalanced)
+ , m_rtcpMuxPolicy(RTCRtcpMuxPolicyNegotiate)
+ {
+ }
- HeapVector<Member<RTCIceServer>> m_servers;
+ Member<RTCIceServerArray> m_iceServers;
RTCIceTransports m_iceTransports;
RTCBundlePolicy m_bundlePolicy;
RTCRtcpMuxPolicy m_rtcpMuxPolicy;

Powered by Google App Engine
This is Rietveld 408576698