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

Unified Diff: Source/platform/exported/WebRTCConfiguration.cpp

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/exported/WebRTCConfiguration.cpp
diff --git a/Source/platform/exported/WebRTCConfiguration.cpp b/Source/platform/exported/WebRTCConfiguration.cpp
index df1150dee6d2346b1bffd8539b4cc645ac59e5bc..0a875aebbdc5e4ac10fb598764fc37dea2c3d93c 100644
--- a/Source/platform/exported/WebRTCConfiguration.cpp
+++ b/Source/platform/exported/WebRTCConfiguration.cpp
@@ -71,6 +71,33 @@ WebString WebRTCICEServer::credential() const
return m_private->credential();
}
+WebRTCICEServerArray::WebRTCICEServerArray(RTCIceServerArray* iceServers)
+ : m_private(iceServers)
+{
+}
+
+void WebRTCICEServerArray::assign(const WebRTCICEServerArray& other)
+{
+ m_private = other.m_private;
+}
+
+void WebRTCICEServerArray::reset()
+{
+ m_private.reset();
+}
+
+size_t WebRTCICEServerArray::numberOfServers() const
+{
+ ASSERT(!isNull());
+ return m_private->numberOfServers();
+}
+
+WebRTCICEServer WebRTCICEServerArray::server(size_t index) const
+{
+ ASSERT(!isNull());
+ return WebRTCICEServer(m_private->server(index));
+}
+
WebRTCConfiguration::WebRTCConfiguration(RTCConfiguration* configuration)
: m_private(configuration)
{
@@ -86,16 +113,21 @@ void WebRTCConfiguration::reset()
m_private.reset();
}
+// TODO(guoweis): Remove this function when WebKit rolls into Chromium.
size_t WebRTCConfiguration::numberOfServers() const
{
ASSERT(!isNull());
- return m_private->numberOfServers();
+ if (!m_private->iceServers()) {
+ return 0;
+ }
+ return m_private->iceServers()->numberOfServers();
}
+// TODO(guoweis): Remove this function when WebKit rolls into Chromium.
WebRTCICEServer WebRTCConfiguration::server(size_t index) const
{
ASSERT(!isNull());
- return WebRTCICEServer(m_private->server(index));
+ return WebRTCICEServer(m_private->iceServers()->server(index));
}
WebRTCIceTransports WebRTCConfiguration::iceTransports() const
@@ -144,4 +176,10 @@ WebRTCRtcpMuxPolicy WebRTCConfiguration::rtcpMuxPolicy() const
return WebRTCRtcpMuxPolicyNegotiate;
}
+WebRTCICEServerArray WebRTCConfiguration::iceServers() const
+{
+ ASSERT(!isNull());
+ return WebRTCICEServerArray(m_private->iceServers());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698