Diff
Modified: trunk/LayoutTests/ChangeLog (126327 => 126328)
--- trunk/LayoutTests/ChangeLog 2012-08-22 19:09:05 UTC (rev 126327)
+++ trunk/LayoutTests/ChangeLog 2012-08-22 19:18:34 UTC (rev 126328)
@@ -1,3 +1,13 @@
+2012-08-22 Tommy Widenflycht <[email protected]>
+
+ MediaStream API: Introduce RTCIceCandidate
+ https://bugs.webkit.org/show_bug.cgi?id=93117
+
+ Reviewed by Adam Barth.
+
+ * fast/mediastream/RTCIceCandidate-expected.txt: Added.
+ * fast/mediastream/RTCIceCandidate.html: Added.
+
2012-08-22 Kenneth Russell <[email protected]>
Layout test fast/text/emphasis-overlap.html started failing differently after r126312
Added: trunk/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt (0 => 126328)
--- trunk/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt 2012-08-22 19:18:34 UTC (rev 126328)
@@ -0,0 +1,22 @@
+Tests RTCIceCandidate.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS candidate = new RTCIceCandidate(initializer); did not throw exception.
+PASS candidate.candidate is "foo"
+PASS candidate.sdpMid is "bar"
+PASS candidate.sdpMLineIndex is 6
+PASS candidate = new RTCIceCandidate(initializer); did not throw exception.
+PASS candidate.candidate is "foo"
+PASS candidate.sdpMid is "bar"
+PASS candidate.sdpMLineIndex is 6
+PASS new RTCIceCandidate({}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
+PASS new RTCIceCandidate(5); threw exception TypeError: Not an object..
+PASS new RTCIceCandidate("foobar"); threw exception TypeError: Not an object..
+PASS new RTCIceCandidate(candidate:""); threw exception SyntaxError: Unexpected token :.
+PASS new RTCIceCandidate({candidate:"x"}); did not throw exception.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/mediastream/RTCIceCandidate.html (0 => 126328)
--- trunk/LayoutTests/fast/mediastream/RTCIceCandidate.html (rev 0)
+++ trunk/LayoutTests/fast/mediastream/RTCIceCandidate.html 2012-08-22 19:18:34 UTC (rev 126328)
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("Tests RTCIceCandidate.");
+
+var initializer = {candidate:"foo", sdpMid:"bar", sdpMLineIndex:6};
+var candidate;
+shouldNotThrow('candidate = new RTCIceCandidate(initializer);');
+shouldBe('candidate.candidate', '"foo"');
+shouldBe('candidate.sdpMid', '"bar"');
+shouldBe('candidate.sdpMLineIndex', '6');
+
+initializer = JSON.parse(JSON.stringify(candidate));
+shouldNotThrow('candidate = new RTCIceCandidate(initializer);');
+shouldBe('candidate.candidate', '"foo"');
+shouldBe('candidate.sdpMid', '"bar"');
+shouldBe('candidate.sdpMLineIndex', '6');
+
+shouldThrow('new RTCIceCandidate({});');
+shouldThrow('new RTCIceCandidate(5);');
+shouldThrow('new RTCIceCandidate("foobar");');
+shouldThrow('new RTCIceCandidate(candidate:"");');
+
+shouldNotThrow('new RTCIceCandidate({candidate:"x"});');
+
+window.successfullyParsed = true;
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/CMakeLists.txt (126327 => 126328)
--- trunk/Source/WebCore/CMakeLists.txt 2012-08-22 19:09:05 UTC (rev 126327)
+++ trunk/Source/WebCore/CMakeLists.txt 2012-08-22 19:18:34 UTC (rev 126328)
@@ -222,6 +222,7 @@
Modules/mediastream/NavigatorUserMediaErrorCallback.idl
Modules/mediastream/NavigatorUserMediaSuccessCallback.idl
Modules/mediastream/PeerConnection00.idl
+ Modules/mediastream/RTCIceCandidate.idl
Modules/mediastream/RTCPeerConnection.idl
Modules/mediastream/SessionDescription.idl
@@ -850,6 +851,7 @@
Modules/mediastream/MediaStreamTrackList.cpp
Modules/mediastream/NavigatorMediaStream.cpp
Modules/mediastream/PeerConnection00.cpp
+ Modules/mediastream/RTCIceCandidate.cpp
Modules/mediastream/RTCPeerConnection.cpp
Modules/mediastream/SessionDescription.cpp
Modules/mediastream/UserMediaController.cpp
@@ -1922,6 +1924,7 @@
platform/mediastream/MediaHints.cpp
platform/mediastream/MediaStreamCenter.cpp
platform/mediastream/PeerConnection00Handler.cpp
+ platform/mediastream/RTCIceCandidateDescriptor.cpp
platform/mediastream/RTCPeerConnectionHandler.cpp
platform/mediastream/SessionDescriptionDescriptor.cpp
Modified: trunk/Source/WebCore/ChangeLog (126327 => 126328)
--- trunk/Source/WebCore/ChangeLog 2012-08-22 19:09:05 UTC (rev 126327)
+++ trunk/Source/WebCore/ChangeLog 2012-08-22 19:18:34 UTC (rev 126328)
@@ -1,3 +1,44 @@
+2012-08-22 Tommy Widenflycht <[email protected]>
+
+ MediaStream API: Introduce RTCIceCandidate
+ https://bugs.webkit.org/show_bug.cgi?id=93117
+
+ Reviewed by Adam Barth.
+
+ This patch introduces RTCIceCandidate together with its corresponding
+ WebCore/platform representation.
+
+ Test: fast/mediastream/RTCIceCandidate.html
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Modules/mediastream/DOMWindowMediaStream.idl:
+ * Modules/mediastream/RTCIceCandidate.cpp: Added.
+ (WebCore):
+ (WebCore::RTCIceCandidate::create):
+ (WebCore::RTCIceCandidate::RTCIceCandidate):
+ (WebCore::RTCIceCandidate::~RTCIceCandidate):
+ (WebCore::RTCIceCandidate::candidate):
+ (WebCore::RTCIceCandidate::sdpMid):
+ (WebCore::RTCIceCandidate::sdpMLineIndex):
+ (WebCore::RTCIceCandidate::descriptor):
+ * Modules/mediastream/RTCIceCandidate.h: Added.
+ (WebCore):
+ (RTCIceCandidate):
+ * Modules/mediastream/RTCIceCandidate.idl: Added.
+ * WebCore.gypi:
+ * platform/mediastream/RTCIceCandidateDescriptor.cpp: Added.
+ (WebCore):
+ (WebCore::RTCIceCandidateDescriptor::create):
+ (WebCore::RTCIceCandidateDescriptor::RTCIceCandidateDescriptor):
+ (WebCore::RTCIceCandidateDescriptor::~RTCIceCandidateDescriptor):
+ * platform/mediastream/RTCIceCandidateDescriptor.h: Added.
+ (WebCore):
+ (RTCIceCandidateDescriptor):
+ (WebCore::RTCIceCandidateDescriptor::candidate):
+ (WebCore::RTCIceCandidateDescriptor::sdpMid):
+ (WebCore::RTCIceCandidateDescriptor::sdpMLineIndex):
+
2012-08-22 Mark Rowe <[email protected]>
<http://webkit.org/b/94679> WebCore scrolling thread leaks objects due to them being autoreleased without any autorelease pool in place
Modified: trunk/Source/WebCore/GNUmakefile.list.am (126327 => 126328)
--- trunk/Source/WebCore/GNUmakefile.list.am 2012-08-22 19:09:05 UTC (rev 126327)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2012-08-22 19:18:34 UTC (rev 126328)
@@ -624,6 +624,8 @@
DerivedSources/WebCore/JSRequestAnimationFrameCallback.h \
DerivedSources/WebCore/JSRGBColor.cpp \
DerivedSources/WebCore/JSRGBColor.h \
+ DerivedSources/WebCore/JSRTCIceCandidate.cpp \
+ DerivedSources/WebCore/JSRTCIceCandidate.h \
DerivedSources/WebCore/JSRTCPeerConnection.cpp \
DerivedSources/WebCore/JSRTCPeerConnection.h \
DerivedSources/WebCore/JSScreen.cpp \
@@ -1214,6 +1216,7 @@
$(WebCore)/Modules/mediastream/NavigatorUserMediaErrorCallback.idl \
$(WebCore)/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl \
$(WebCore)/Modules/mediastream/PeerConnection00.idl \
+ $(WebCore)/Modules/mediastream/RTCIceCandidate.idl \
$(WebCore)/Modules/mediastream/RTCPeerConnection.idl \
$(WebCore)/Modules/mediastream/SessionDescription.idl \
$(WebCore)/Modules/notifications/Notification.idl \
@@ -1899,6 +1902,8 @@
Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.h \
Source/WebCore/Modules/mediastream/PeerConnection00.cpp \
Source/WebCore/Modules/mediastream/PeerConnection00.h \
+ Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp \
+ Source/WebCore/Modules/mediastream/RTCIceCandidate.h \
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp \
Source/WebCore/Modules/mediastream/RTCPeerConnection.h \
Source/WebCore/Modules/mediastream/SessionDescription.cpp \
@@ -5481,6 +5486,9 @@
Source/WebCore/platform/mediastream/PeerConnection00Handler.h \
Source/WebCore/platform/mediastream/PeerConnection00HandlerClient.h \
Source/WebCore/platform/mediastream/RTCConfiguration.h \
+ Source/WebCore/platform/mediastream/RTCIceCandidateDescriptor.cpp \
+ Source/WebCore/platform/mediastream/RTCIceCandidateDescriptor.h \
+ Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.h \
Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.cpp \
Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h \
Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h \
Modified: trunk/Source/WebCore/Modules/mediastream/DOMWindowMediaStream.idl (126327 => 126328)
--- trunk/Source/WebCore/Modules/mediastream/DOMWindowMediaStream.idl 2012-08-22 19:09:05 UTC (rev 126327)
+++ trunk/Source/WebCore/Modules/mediastream/DOMWindowMediaStream.idl 2012-08-22 19:18:34 UTC (rev 126328)
@@ -35,6 +35,7 @@
attribute [V8EnabledAtRuntime] RTCPeerConnectionConstructor webkitRTCPeerConnection;
attribute SessionDescriptionConstructor SessionDescription;
attribute IceCandidateConstructor IceCandidate;
+ attribute RTCIceCandidateConstructor RTCIceCandidate;
attribute MediaStreamEventConstructor MediaStreamEvent;
};
Added: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp (0 => 126328)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp 2012-08-22 19:18:34 UTC (rev 126328)
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name of Google Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "RTCIceCandidate.h"
+
+#include "Dictionary.h"
+#include "ExceptionCode.h"
+#include "InspectorValues.h"
+#include "RTCIceCandidateDescriptor.h"
+
+namespace WebCore {
+
+PassRefPtr<RTCIceCandidate> RTCIceCandidate::create(const Dictionary& dictionary, ExceptionCode& ec)
+{
+ String candidate;
+ bool ok = dictionary.get("candidate", candidate);
+ if (!ok || !candidate.length()) {
+ ec = TYPE_MISMATCH_ERR;
+ return 0;
+ }
+
+ String sdpMid;
+ dictionary.get("sdpMid", sdpMid);
+
+ unsigned short sdpMLineIndex = 0;
+ dictionary.get("sdpMLineIndex", sdpMLineIndex);
+
+ return adoptRef(new RTCIceCandidate(RTCIceCandidateDescriptor::create(candidate, sdpMid, sdpMLineIndex)));
+}
+
+PassRefPtr<RTCIceCandidate> RTCIceCandidate::create(PassRefPtr<RTCIceCandidateDescriptor> descriptor)
+{
+ return adoptRef(new RTCIceCandidate(descriptor));
+}
+
+RTCIceCandidate::RTCIceCandidate(PassRefPtr<RTCIceCandidateDescriptor> descriptor)
+ : m_descriptor(descriptor)
+{
+}
+
+RTCIceCandidate::~RTCIceCandidate()
+{
+}
+
+const String& RTCIceCandidate::candidate()
+{
+ return m_descriptor->candidate();
+}
+
+const String& RTCIceCandidate::sdpMid()
+{
+ return m_descriptor->sdpMid();
+}
+
+unsigned short RTCIceCandidate::sdpMLineIndex()
+{
+ return m_descriptor->sdpMLineIndex();
+}
+
+RTCIceCandidateDescriptor* RTCIceCandidate::descriptor()
+{
+ return m_descriptor.get();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
Added: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.h (0 => 126328)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.h (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.h 2012-08-22 19:18:34 UTC (rev 126328)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name of Google Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RTCIceCandidate_h
+#define RTCIceCandidate_h
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "ExceptionBase.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class Dictionary;
+class RTCIceCandidateDescriptor;
+
+class RTCIceCandidate : public RefCounted<RTCIceCandidate> {
+public:
+ static PassRefPtr<RTCIceCandidate> create(const Dictionary&, ExceptionCode&);
+ static PassRefPtr<RTCIceCandidate> create(PassRefPtr<RTCIceCandidateDescriptor>);
+ virtual ~RTCIceCandidate();
+
+ const String& candidate();
+ const String& sdpMid();
+ unsigned short sdpMLineIndex();
+
+ RTCIceCandidateDescriptor* descriptor();
+
+private:
+ explicit RTCIceCandidate(PassRefPtr<RTCIceCandidateDescriptor>);
+
+ RefPtr<RTCIceCandidateDescriptor> m_descriptor;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // RTCIceCandidate_h
Added: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl (0 => 126328)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl 2012-08-22 19:18:34 UTC (rev 126328)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name of Google Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module mediastream {
+
+ interface [
+ Conditional=MEDIA_STREAM,
+ Constructor(in Dictionary dictionary),
+ ConstructorRaisesException
+ ] RTCIceCandidate {
+ readonly attribute DOMString candidate;
+ readonly attribute DOMString sdpMid;
+ readonly attribute unsigned short sdpMLineIndex;
+ };
+
+}
Modified: trunk/Source/WebCore/WebCore.gypi (126327 => 126328)
--- trunk/Source/WebCore/WebCore.gypi 2012-08-22 19:09:05 UTC (rev 126327)
+++ trunk/Source/WebCore/WebCore.gypi 2012-08-22 19:18:34 UTC (rev 126328)
@@ -455,6 +455,8 @@
'platform/mediastream/PeerConnection00Handler.h',
'platform/mediastream/PeerConnection00HandlerClient.h',
'platform/mediastream/RTCConfiguration.h',
+ 'platform/mediastream/RTCIceCandidateDescriptor.cpp',
+ 'platform/mediastream/RTCIceCandidateDescriptor.h',
'platform/mediastream/RTCPeerConnectionHandler.h',
'platform/mediastream/RTCPeerConnectionHandlerClient.h',
'platform/mediastream/SessionDescriptionDescriptor.cpp',
@@ -854,6 +856,7 @@
'Modules/mediastream/NavigatorUserMediaErrorCallback.idl',
'Modules/mediastream/NavigatorUserMediaSuccessCallback.idl',
'Modules/mediastream/PeerConnection00.idl',
+ 'Modules/mediastream/RTCIceCandidate.idl',
'Modules/mediastream/RTCPeerConnection.idl',
'Modules/mediastream/SessionDescription.idl',
'Modules/notifications/DOMWindowNotifications.idl',
@@ -1590,6 +1593,8 @@
'Modules/mediastream/NavigatorUserMediaSuccessCallback.h',
'Modules/mediastream/PeerConnection00.cpp',
'Modules/mediastream/PeerConnection00.h',
+ 'Modules/mediastream/RTCIceCandidate.cpp',
+ 'Modules/mediastream/RTCIceCandidate.h',
'Modules/mediastream/RTCPeerConnection.cpp',
'Modules/mediastream/RTCPeerConnection.h',
'Modules/mediastream/SessionDescription.cpp',
Added: trunk/Source/WebCore/platform/mediastream/RTCIceCandidateDescriptor.cpp (0 => 126328)
--- trunk/Source/WebCore/platform/mediastream/RTCIceCandidateDescriptor.cpp (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/RTCIceCandidateDescriptor.cpp 2012-08-22 19:18:34 UTC (rev 126328)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name of Google Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "RTCIceCandidateDescriptor.h"
+
+namespace WebCore {
+
+PassRefPtr<RTCIceCandidateDescriptor> RTCIceCandidateDescriptor::create(const String& candidate, const String& sdpMid, unsigned short sdpMLineIndex)
+{
+ return adoptRef(new RTCIceCandidateDescriptor(candidate, sdpMid, sdpMLineIndex));
+}
+
+RTCIceCandidateDescriptor::RTCIceCandidateDescriptor(const String& candidate, const String& sdpMid, unsigned short sdpMLineIndex)
+ : m_candidate(candidate)
+ , m_sdpMid(sdpMid)
+ , m_sdpMLineIndex(sdpMLineIndex)
+{
+}
+
+RTCIceCandidateDescriptor::~RTCIceCandidateDescriptor()
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
Added: trunk/Source/WebCore/platform/mediastream/RTCIceCandidateDescriptor.h (0 => 126328)
--- trunk/Source/WebCore/platform/mediastream/RTCIceCandidateDescriptor.h (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/RTCIceCandidateDescriptor.h 2012-08-22 19:18:34 UTC (rev 126328)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name of Google Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RTCIceCandidateDescriptor_h
+#define RTCIceCandidateDescriptor_h
+
+#if ENABLE(MEDIA_STREAM)
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class RTCIceCandidateDescriptor : public RefCounted<RTCIceCandidateDescriptor> {
+public:
+ static PassRefPtr<RTCIceCandidateDescriptor> create(const String& candidate, const String& sdpMid, unsigned short sdpMLineIndex);
+ virtual ~RTCIceCandidateDescriptor();
+
+ const String& candidate() { return m_candidate; }
+ const String& sdpMid() { return m_sdpMid; }
+ unsigned short sdpMLineIndex() { return m_sdpMLineIndex; }
+
+private:
+ RTCIceCandidateDescriptor(const String& candidate, const String& sdpMid, unsigned short sdpMLineIndex);
+
+ String m_candidate;
+ String m_sdpMid;
+ unsigned short m_sdpMLineIndex;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // RTCIceCandidateDescriptor_h