Diff
Modified: trunk/Source/WebCore/ChangeLog (111576 => 111577)
--- trunk/Source/WebCore/ChangeLog 2012-03-21 17:52:50 UTC (rev 111576)
+++ trunk/Source/WebCore/ChangeLog 2012-03-21 17:55:04 UTC (rev 111577)
@@ -1,3 +1,31 @@
+2012-03-21 Tommy Widenflycht <[email protected]>
+
+ [chromium] MediaStream API (JSEP): Introducing WebSessionDescription and WebIceCandidate
+ https://bugs.webkit.org/show_bug.cgi?id=81339
+
+ Reviewed by Adam Barth.
+
+ Not possible to test until the entire JSEP feature is commited.
+
+ * Modules/mediastream/IceCandidate.cpp:
+ (WebCore::IceCandidate::toSdp):
+ * Modules/mediastream/SessionDescription.cpp:
+ (WebCore::SessionDescription::toSdp):
+ * platform/mediastream/IceCandidateDescriptor.cpp:
+ (WebCore::IceCandidateDescriptor::toSDP):
+ * platform/mediastream/IceCandidateDescriptor.h:
+ (IceCandidateDescriptor):
+ * platform/mediastream/MediaStreamCenter.cpp:
+ (WebCore::MediaStreamCenter::constructSDP):
+ * platform/mediastream/MediaStreamCenter.h:
+ (MediaStreamCenter):
+ * platform/mediastream/SessionDescriptionDescriptor.cpp:
+ (WebCore::SessionDescriptionDescriptor::SessionDescriptionDescriptor):
+ (WebCore::SessionDescriptionDescriptor::toSDP):
+ (WebCore::SessionDescriptionDescriptor::initialSDP):
+ * platform/mediastream/SessionDescriptionDescriptor.h:
+ (SessionDescriptionDescriptor):
+
2012-03-21 Yuta Kitamura <[email protected]>
Use RFC version of WebSocket protocol by default
Modified: trunk/Source/WebCore/Modules/mediastream/IceCandidate.cpp (111576 => 111577)
--- trunk/Source/WebCore/Modules/mediastream/IceCandidate.cpp 2012-03-21 17:52:50 UTC (rev 111576)
+++ trunk/Source/WebCore/Modules/mediastream/IceCandidate.cpp 2012-03-21 17:55:04 UTC (rev 111577)
@@ -69,7 +69,7 @@
String IceCandidate::toSdp()
{
- return m_descriptor->toSdp();
+ return m_descriptor->toSDP();
}
IceCandidateDescriptor* IceCandidate::descriptor()
Modified: trunk/Source/WebCore/Modules/mediastream/SessionDescription.cpp (111576 => 111577)
--- trunk/Source/WebCore/Modules/mediastream/SessionDescription.cpp 2012-03-21 17:52:50 UTC (rev 111576)
+++ trunk/Source/WebCore/Modules/mediastream/SessionDescription.cpp 2012-03-21 17:55:04 UTC (rev 111577)
@@ -67,7 +67,7 @@
String SessionDescription::toSdp()
{
- return m_descriptor->toSdp();
+ return m_descriptor->toSDP();
}
SessionDescriptionDescriptor* SessionDescription::descriptor()
Modified: trunk/Source/WebCore/platform/mediastream/IceCandidateDescriptor.cpp (111576 => 111577)
--- trunk/Source/WebCore/platform/mediastream/IceCandidateDescriptor.cpp 2012-03-21 17:52:50 UTC (rev 111576)
+++ trunk/Source/WebCore/platform/mediastream/IceCandidateDescriptor.cpp 2012-03-21 17:55:04 UTC (rev 111577)
@@ -53,9 +53,9 @@
{
}
-String IceCandidateDescriptor::toSdp()
+String IceCandidateDescriptor::toSDP()
{
- return MediaStreamCenter::instance().constructSdp(this);
+ return MediaStreamCenter::instance().constructSDP(this);
}
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/mediastream/IceCandidateDescriptor.h (111576 => 111577)
--- trunk/Source/WebCore/platform/mediastream/IceCandidateDescriptor.h 2012-03-21 17:52:50 UTC (rev 111576)
+++ trunk/Source/WebCore/platform/mediastream/IceCandidateDescriptor.h 2012-03-21 17:55:04 UTC (rev 111577)
@@ -47,7 +47,7 @@
const String& label() { return m_label; }
const String& candidateLine() { return m_candidateLine; }
- String toSdp();
+ String toSDP();
private:
IceCandidateDescriptor(const String& label, const String& candidateLine);
Modified: trunk/Source/WebCore/platform/mediastream/MediaStreamCenter.cpp (111576 => 111577)
--- trunk/Source/WebCore/platform/mediastream/MediaStreamCenter.cpp 2012-03-21 17:52:50 UTC (rev 111576)
+++ trunk/Source/WebCore/platform/mediastream/MediaStreamCenter.cpp 2012-03-21 17:55:04 UTC (rev 111577)
@@ -58,12 +58,12 @@
streamDescriptor->setEnded();
}
-String MediaStreamCenter::constructSdp(IceCandidateDescriptor*)
+String MediaStreamCenter::constructSDP(IceCandidateDescriptor*)
{
return "";
}
-String MediaStreamCenter::constructSdp(SessionDescriptionDescriptor*)
+String MediaStreamCenter::constructSDP(SessionDescriptionDescriptor*)
{
return "";
}
Modified: trunk/Source/WebCore/platform/mediastream/MediaStreamCenter.h (111576 => 111577)
--- trunk/Source/WebCore/platform/mediastream/MediaStreamCenter.h 2012-03-21 17:52:50 UTC (rev 111576)
+++ trunk/Source/WebCore/platform/mediastream/MediaStreamCenter.h 2012-03-21 17:55:04 UTC (rev 111577)
@@ -77,8 +77,8 @@
void didStopLocalMediaStream(MediaStreamDescriptor*);
void didConstructMediaStream(MediaStreamDescriptor*);
- String constructSdp(IceCandidateDescriptor*);
- String constructSdp(SessionDescriptionDescriptor*);
+ String constructSDP(IceCandidateDescriptor*);
+ String constructSDP(SessionDescriptionDescriptor*);
// Calls from the platform to update the DOM objects
void endLocalMediaStream(MediaStreamDescriptor*);
Modified: trunk/Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.cpp (111576 => 111577)
--- trunk/Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.cpp 2012-03-21 17:52:50 UTC (rev 111576)
+++ trunk/Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.cpp 2012-03-21 17:55:04 UTC (rev 111577)
@@ -45,7 +45,7 @@
}
SessionDescriptionDescriptor::SessionDescriptionDescriptor(const String& sdp)
- : m_initialSdp(sdp)
+ : m_initialSDP(sdp)
{
}
@@ -58,9 +58,9 @@
m_candidates.append(candidate);
}
-String SessionDescriptionDescriptor::toSdp()
+String SessionDescriptionDescriptor::toSDP()
{
- return MediaStreamCenter::instance().constructSdp(this);
+ return MediaStreamCenter::instance().constructSDP(this);
}
size_t SessionDescriptionDescriptor::numberOfAddedCandidates() const
@@ -73,9 +73,9 @@
return m_candidates[index].get();
}
-const String& SessionDescriptionDescriptor::initialSdp()
+const String& SessionDescriptionDescriptor::initialSDP()
{
- return m_initialSdp;
+ return m_initialSDP;
}
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.h (111576 => 111577)
--- trunk/Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.h 2012-03-21 17:52:50 UTC (rev 111576)
+++ trunk/Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.h 2012-03-21 17:55:04 UTC (rev 111577)
@@ -47,16 +47,16 @@
virtual ~SessionDescriptionDescriptor();
void addCandidate(PassRefPtr<IceCandidateDescriptor>);
- String toSdp();
+ String toSDP();
size_t numberOfAddedCandidates() const;
IceCandidateDescriptor* candidate(size_t index) const;
- const String& initialSdp();
+ const String& initialSDP();
private:
explicit SessionDescriptionDescriptor(const String& sdp);
- String m_initialSdp;
+ String m_initialSDP;
Vector<RefPtr<IceCandidateDescriptor> > m_candidates;
};
Modified: trunk/Source/WebKit/chromium/ChangeLog (111576 => 111577)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-03-21 17:52:50 UTC (rev 111576)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-03-21 17:55:04 UTC (rev 111577)
@@ -1,3 +1,49 @@
+2012-03-21 Tommy Widenflycht <[email protected]>
+
+ [chromium] MediaStream API (JSEP): Introducing WebSessionDescription and WebIceCandidate
+ https://bugs.webkit.org/show_bug.cgi?id=81339
+
+ Reviewed by Adam Barth.
+
+ Simple WebKit representations of the WebCore/platform versions.
+
+ * WebKit.gyp:
+ * public/platform/WebICECandidateDescriptor.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebICECandidateDescriptor):
+ (WebKit::WebICECandidateDescriptor::WebICECandidateDescriptor):
+ (WebKit::WebICECandidateDescriptor::~WebICECandidateDescriptor):
+ (WebKit::WebICECandidateDescriptor::operator=):
+ (WebKit::WebICECandidateDescriptor::isNull):
+ * public/platform/WebSessionDescriptionDescriptor.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebSessionDescriptionDescriptor):
+ (WebKit::WebSessionDescriptionDescriptor::WebSessionDescriptionDescriptor):
+ (WebKit::WebSessionDescriptionDescriptor::~WebSessionDescriptionDescriptor):
+ (WebKit::WebSessionDescriptionDescriptor::operator=):
+ (WebKit::WebSessionDescriptionDescriptor::isNull):
+ * src/WebICECandidateDescriptor.cpp: Added.
+ (WebKit):
+ (WebKit::WebICECandidateDescriptor::WebICECandidateDescriptor):
+ (WebKit::WebICECandidateDescriptor::assign):
+ (WebKit::WebICECandidateDescriptor::reset):
+ (WebKit::WebICECandidateDescriptor::initialize):
+ (WebKit::WebICECandidateDescriptor::operator PassRefPtr<WebCore::IceCandidateDescriptor>):
+ (WebKit::WebICECandidateDescriptor::label):
+ (WebKit::WebICECandidateDescriptor::candidateLine):
+ * src/WebSessionDescriptionDescriptor.cpp: Added.
+ (WebKit):
+ (WebKit::WebSessionDescriptionDescriptor::WebSessionDescriptionDescriptor):
+ (WebKit::WebSessionDescriptionDescriptor::assign):
+ (WebKit::WebSessionDescriptionDescriptor::reset):
+ (WebKit::WebSessionDescriptionDescriptor::operator WTF::PassRefPtr<WebCore::SessionDescriptionDescriptor>):
+ (WebKit::WebSessionDescriptionDescriptor::initialize):
+ (WebKit::WebSessionDescriptionDescriptor::numberOfAddedCandidates):
+ (WebKit::WebSessionDescriptionDescriptor::candidate):
+ (WebKit::WebSessionDescriptionDescriptor::initialSDP):
+
2012-03-21 Sami Kyostila <[email protected]>
[chromium] Use floating point scroll deltas for layers
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (111576 => 111577)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2012-03-21 17:52:50 UTC (rev 111576)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2012-03-21 17:55:04 UTC (rev 111577)
@@ -173,6 +173,7 @@
'public/WebGeolocationPosition.h',
'public/WebGlyphCache.h',
'public/WebHistoryItem.h',
+ 'public/WebICECandidateDescriptor.h',
'public/WebICEOptions.h',
'public/WebIDBCallbacks.h',
'public/WebIDBCursor.h',
@@ -247,6 +248,7 @@
'public/WebSecurityOrigin.h',
'public/WebSecurityPolicy.h',
'public/WebSelectElement.h',
+ 'public/WebSessionDescriptionDescriptor.h',
'public/WebSettings.h',
'public/WebSharedWorkerClient.h',
'public/WebSharedWorker.h',
@@ -562,6 +564,7 @@
'src/WebHistoryItem.cpp',
'src/WebHTTPBody.cpp',
'src/WebHTTPLoadInfo.cpp',
+ 'src/WebICECandidateDescriptor.cpp',
'src/WebICEOptions.cpp',
'src/WebIconLoadingCompletionImpl.cpp',
'src/WebIconLoadingCompletionImpl.h',
@@ -650,6 +653,7 @@
'src/WebSecurityPolicy.cpp',
'src/WebSelectElement.cpp',
'src/WebSerializedScriptValue.cpp',
+ 'src/WebSessionDescriptionDescriptor.cpp',
'src/WebSettingsImpl.cpp',
'src/WebSettingsImpl.h',
'src/WebSharedWorkerImpl.cpp',
Added: trunk/Source/WebKit/chromium/public/platform/WebICECandidateDescriptor.h (0 => 111577)
--- trunk/Source/WebKit/chromium/public/platform/WebICECandidateDescriptor.h (rev 0)
+++ trunk/Source/WebKit/chromium/public/platform/WebICECandidateDescriptor.h 2012-03-21 17:55:04 UTC (rev 111577)
@@ -0,0 +1,82 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * 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 WebICECandidateDescriptor_h
+#define WebICECandidateDescriptor_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore {
+class IceCandidateDescriptor;
+}
+
+namespace WebKit {
+
+class WebString;
+
+class WebICECandidateDescriptor {
+public:
+ WebICECandidateDescriptor() { }
+ WebICECandidateDescriptor(const WebICECandidateDescriptor& other) { assign(other); }
+ ~WebICECandidateDescriptor() { reset(); }
+
+ WebICECandidateDescriptor& operator=(const WebICECandidateDescriptor& other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ WEBKIT_EXPORT void assign(const WebICECandidateDescriptor&);
+
+ WEBKIT_EXPORT void initialize(const WebString& label, const WebString& candidateLine);
+ WEBKIT_EXPORT void reset();
+ bool isNull() const { return m_private.isNull(); }
+
+ // The SDP m= line this candidate is associated with.
+ WEBKIT_EXPORT WebString label() const;
+
+ // The actual SDP candidate.
+ WEBKIT_EXPORT WebString candidateLine() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebICECandidateDescriptor(WebCore::IceCandidateDescriptor*);
+ WebICECandidateDescriptor(WTF::PassRefPtr<WebCore::IceCandidateDescriptor>);
+
+ operator WTF::PassRefPtr<WebCore::IceCandidateDescriptor>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::IceCandidateDescriptor> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebICECandidateDescriptor_h
Added: trunk/Source/WebKit/chromium/public/platform/WebSessionDescriptionDescriptor.h (0 => 111577)
--- trunk/Source/WebKit/chromium/public/platform/WebSessionDescriptionDescriptor.h (rev 0)
+++ trunk/Source/WebKit/chromium/public/platform/WebSessionDescriptionDescriptor.h 2012-03-21 17:55:04 UTC (rev 111577)
@@ -0,0 +1,93 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * 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 WebSessionDescriptionDescriptor_h
+#define WebSessionDescriptionDescriptor_h
+
+#include "WebCommon.h"
+#include "WebNonCopyable.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore {
+class SessionDescriptionDescriptor;
+}
+
+namespace WebKit {
+class WebString;
+class WebICECandidateDescriptor;
+
+/*
+ * In order to establish the media plane, PeerConnection needs specific
+ * parameters to indicate what to transmit to the remote side, as well
+ * as how to handle the media that is received. These parameters are
+ * determined by the exchange of session descriptions in offers and
+ * answers, and there are certain details to this process that must be
+ * handled in the JSEP APIs.
+
+ * Whether a session description was sent or received affects the
+ * meaning of that description. For example, the list of codecs sent to
+ * a remote party indicates what the local side is willing to decode,
+ * and what the remote party should send.
+ */
+class WebSessionDescriptionDescriptor {
+public:
+ WebSessionDescriptionDescriptor() { }
+ WebSessionDescriptionDescriptor(const WebSessionDescriptionDescriptor& other) { assign(other); }
+ ~WebSessionDescriptionDescriptor() { reset(); }
+
+ WebSessionDescriptionDescriptor& operator=(const WebSessionDescriptionDescriptor& other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ WEBKIT_EXPORT void assign(const WebSessionDescriptionDescriptor&);
+
+ WEBKIT_EXPORT void initialize(const WebString& sdp);
+ WEBKIT_EXPORT void reset();
+ bool isNull() const { return m_private.isNull(); }
+
+ WEBKIT_EXPORT size_t numberOfAddedCandidates() const;
+ WEBKIT_EXPORT WebICECandidateDescriptor candidate(size_t index) const;
+ WEBKIT_EXPORT WebString initialSDP() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebSessionDescriptionDescriptor(const WTF::PassRefPtr<WebCore::SessionDescriptionDescriptor>&);
+
+ operator WTF::PassRefPtr<WebCore::SessionDescriptionDescriptor>();
+#endif
+
+private:
+ WebPrivatePtr<WebCore::SessionDescriptionDescriptor> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebSessionDescriptionDescriptor_h
Added: trunk/Source/WebKit/chromium/src/WebICECandidateDescriptor.cpp (0 => 111577)
--- trunk/Source/WebKit/chromium/src/WebICECandidateDescriptor.cpp (rev 0)
+++ trunk/Source/WebKit/chromium/src/WebICECandidateDescriptor.cpp 2012-03-21 17:55:04 UTC (rev 111577)
@@ -0,0 +1,89 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * 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 "platform/WebICECandidateDescriptor.h"
+
+#include "IceCandidateDescriptor.h"
+#include "platform/WebString.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebICECandidateDescriptor::WebICECandidateDescriptor(IceCandidateDescriptor* iceCandidate)
+ : m_private(iceCandidate)
+{
+}
+
+WebICECandidateDescriptor::WebICECandidateDescriptor(PassRefPtr<IceCandidateDescriptor> iceCandidate)
+ : m_private(iceCandidate)
+{
+}
+
+void WebICECandidateDescriptor::assign(const WebICECandidateDescriptor& other)
+{
+ m_private = other.m_private;
+}
+
+void WebICECandidateDescriptor::reset()
+{
+ m_private.reset();
+}
+
+void WebICECandidateDescriptor::initialize(const WebString& label, const WebString& candidateLine)
+{
+ m_private = IceCandidateDescriptor::create(label, candidateLine);
+}
+
+WebICECandidateDescriptor::operator PassRefPtr<WebCore::IceCandidateDescriptor>() const
+{
+ return m_private.get();
+}
+
+WebString WebICECandidateDescriptor::label() const
+{
+ ASSERT(!m_private.isNull());
+ return m_private.get()->label();
+}
+
+WebString WebICECandidateDescriptor::candidateLine() const
+{
+ ASSERT(!m_private.isNull());
+ return m_private.get()->candidateLine();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(MEDIA_STREAM)
+
Added: trunk/Source/WebKit/chromium/src/WebSessionDescriptionDescriptor.cpp (0 => 111577)
--- trunk/Source/WebKit/chromium/src/WebSessionDescriptionDescriptor.cpp (rev 0)
+++ trunk/Source/WebKit/chromium/src/WebSessionDescriptionDescriptor.cpp 2012-03-21 17:55:04 UTC (rev 111577)
@@ -0,0 +1,92 @@
+/*
+ * 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * 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 "platform/WebSessionDescriptionDescriptor.h"
+
+#include "SessionDescriptionDescriptor.h"
+#include "platform/WebICECandidateDescriptor.h"
+#include "platform/WebString.h"
+#include <wtf/Vector.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebSessionDescriptionDescriptor::WebSessionDescriptionDescriptor(const PassRefPtr<SessionDescriptionDescriptor>& sessionDescription)
+ : m_private(sessionDescription)
+{
+}
+
+void WebSessionDescriptionDescriptor::assign(const WebSessionDescriptionDescriptor& other)
+{
+ m_private = other.m_private;
+}
+
+void WebSessionDescriptionDescriptor::reset()
+{
+ m_private.reset();
+}
+
+WebSessionDescriptionDescriptor::operator WTF::PassRefPtr<WebCore::SessionDescriptionDescriptor>()
+{
+ return m_private.get();
+}
+
+void WebSessionDescriptionDescriptor::initialize(const WebString& sdp)
+{
+ m_private = SessionDescriptionDescriptor::create(sdp);
+}
+
+size_t WebSessionDescriptionDescriptor::numberOfAddedCandidates() const
+{
+ ASSERT(!m_private.isNull());
+ return m_private.get()->numberOfAddedCandidates();
+}
+
+WebICECandidateDescriptor WebSessionDescriptionDescriptor::candidate(size_t index) const
+{
+ ASSERT(!m_private.isNull());
+ return m_private.get()->candidate(index);
+}
+
+WebString WebSessionDescriptionDescriptor::initialSDP() const
+{
+ ASSERT(!m_private.isNull());
+ return m_private.get()->initialSDP();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(MEDIA_STREAM)
+