Commit ee34ed92 authored by tommyw@google.com's avatar tommyw@google.com

MediaStream API: Add the async createOffer functionality to RTCPeerConnection

https://bugs.webkit.org/show_bug.cgi?id=95734

Reviewed by Adam Barth.

Source/Platform:

* Platform.gypi:
* chromium/public/WebRTCPeerConnectionHandler.h:
(WebKit):
(WebRTCPeerConnectionHandler):
* chromium/public/WebRTCSessionDescriptionDescriptor.h: Added.
(WebCore):
(WebKit):
(WebRTCSessionDescriptionDescriptor):
(WebKit::WebRTCSessionDescriptionDescriptor::WebRTCSessionDescriptionDescriptor):
(WebKit::WebRTCSessionDescriptionDescriptor::~WebRTCSessionDescriptionDescriptor):
(WebKit::WebRTCSessionDescriptionDescriptor::operator=):
(WebKit::WebRTCSessionDescriptionDescriptor::isNull):
* chromium/public/WebRTCSessionDescriptionRequest.h: Added.
(WebCore):
(WebKit):
(WebRTCSessionDescriptionRequest):
(ExtraData):
(WebKit::WebRTCSessionDescriptionRequest::ExtraData::~ExtraData):
(WebKit::WebRTCSessionDescriptionRequest::WebRTCSessionDescriptionRequest):
(WebKit::WebRTCSessionDescriptionRequest::~WebRTCSessionDescriptionRequest):
(WebKit::WebRTCSessionDescriptionRequest::operator=):
(WebKit::WebRTCSessionDescriptionRequest::isNull):

Source/WebCore:

createOffer sends a request to the platform implementer requesting it to gather up all candidates.
This can take some time, therefore the request is async.

Test: fast/mediastream/RTCPeerConnection-createOffer.html

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/RTCErrorCallback.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
(WebCore):
(RTCErrorCallback):
(WebCore::RTCErrorCallback::~RTCErrorCallback):
* Modules/mediastream/RTCErrorCallback.idl: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createOffer):
(WebCore):
* Modules/mediastream/RTCPeerConnection.h:
(WebCore):
(RTCPeerConnection):
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescriptionCallback.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
(WebCore):
(RTCSessionDescriptionCallback):
(WebCore::RTCSessionDescriptionCallback::~RTCSessionDescriptionCallback):
* Modules/mediastream/RTCSessionDescriptionCallback.idl: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
* Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp: Added.
(WebCore):
(WebCore::RTCSessionDescriptionRequestImpl::create):
(WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
(WebCore::RTCSessionDescriptionRequestImpl::~RTCSessionDescriptionRequestImpl):
(WebCore::RTCSessionDescriptionRequestImpl::requestSucceeded):
(WebCore::RTCSessionDescriptionRequestImpl::requestFailed):
(WebCore::RTCSessionDescriptionRequestImpl::stop):
(WebCore::RTCSessionDescriptionRequestImpl::clear):
* Modules/mediastream/RTCSessionDescriptionRequestImpl.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
(WebCore):
(RTCSessionDescriptionRequestImpl):
* WebCore.gypi:
* platform/chromium/support/WebRTCSessionDescriptionDescriptor.cpp: Copied from Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h.
(WebKit):
(WebKit::WebRTCSessionDescriptionDescriptor::WebRTCSessionDescriptionDescriptor):
(WebKit::WebRTCSessionDescriptionDescriptor::assign):
(WebKit::WebRTCSessionDescriptionDescriptor::reset):
(WebKit::WebRTCSessionDescriptionDescriptor::operator WTF::PassRefPtr<WebCore::RTCSessionDescriptionDescriptor>):
(WebKit::WebRTCSessionDescriptionDescriptor::initialize):
(WebKit::WebRTCSessionDescriptionDescriptor::type):
(WebKit::WebRTCSessionDescriptionDescriptor::setType):
(WebKit::WebRTCSessionDescriptionDescriptor::sdp):
(WebKit::WebRTCSessionDescriptionDescriptor::setSDP):
* platform/chromium/support/WebRTCSessionDescriptionRequest.cpp: Added.
(WebKit):
(WebKit::WebRTCSessionDescriptionRequest::WebRTCSessionDescriptionRequest):
(WebKit::WebRTCSessionDescriptionRequest::assign):
(WebKit::WebRTCSessionDescriptionRequest::reset):
(WebKit::WebRTCSessionDescriptionRequest::requestSucceeded):
(WebKit::WebRTCSessionDescriptionRequest::requestFailed):
(ExtraDataContainer):
(WebKit::ExtraDataContainer::ExtraDataContainer):
(WebKit::ExtraDataContainer::extraData):
(WebKit::WebRTCSessionDescriptionRequest::extraData):
(WebKit::WebRTCSessionDescriptionRequest::setExtraData):
* platform/mediastream/RTCPeerConnectionHandler.cpp:
(RTCPeerConnectionHandlerDummy):
(WebCore::RTCPeerConnectionHandlerDummy::createOffer):
(WebCore):
* platform/mediastream/RTCPeerConnectionHandler.h:
(WebCore):
(RTCPeerConnectionHandler):
* platform/mediastream/RTCSessionDescriptionDescriptor.h:
(WebCore::RTCSessionDescriptionDescriptor::type):
(WebCore::RTCSessionDescriptionDescriptor::sdp):
* platform/mediastream/RTCSessionDescriptionRequest.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
(WebCore):
(RTCSessionDescriptionRequest):
(ExtraData):
(WebCore::RTCSessionDescriptionRequest::ExtraData::~ExtraData):
(WebCore::RTCSessionDescriptionRequest::~RTCSessionDescriptionRequest):
(WebCore::RTCSessionDescriptionRequest::extraData):
(WebCore::RTCSessionDescriptionRequest::setExtraData):
(WebCore::RTCSessionDescriptionRequest::RTCSessionDescriptionRequest):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
(WebCore::RTCPeerConnectionHandlerChromium::createOffer):
(WebCore):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
(RTCPeerConnectionHandlerChromium):

Tools:

* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(MockWebRTCPeerConnectionHandler::SuccessCallbackTask::SuccessCallbackTask):
(MockWebRTCPeerConnectionHandler::SuccessCallbackTask::runIfValid):
(MockWebRTCPeerConnectionHandler::FailureCallbackTask::FailureCallbackTask):
(MockWebRTCPeerConnectionHandler::FailureCallbackTask::runIfValid):
(MockWebRTCPeerConnectionHandler::createOffer):
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
(MockWebRTCPeerConnectionHandler):
(MockWebRTCPeerConnectionHandler::taskList):
(SuccessCallbackTask):
(FailureCallbackTask):

LayoutTests:

* fast/mediastream/RTCPeerConnection-createOffer-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-createOffer.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6cb577ef
2012-09-04 Tommy Widenflycht <tommyw@google.com>
MediaStream API: Add the async createOffer functionality to RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=95734
Reviewed by Adam Barth.
* fast/mediastream/RTCPeerConnection-createOffer-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-createOffer.html: Added.
2012-09-04 Dan Bernstein <mitz@apple.com>
Reverted r127468 (the fix for <http://webkit.org/b/93443>) because the test it included caused
Tests RTCPeerConnection [add|remove]Stream.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS requestSucceeded was called.
PASS sessionDescription.type is "offer"
PASS requestFailed was called.
PASS errorReason is "TEST_ERROR"
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../js/resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Tests RTCPeerConnection [add|remove]Stream.");
var pc = null;
function requestFailed2(reason)
{
testPassed('requestFailed was called.');
errorReason = reason;
shouldBe('errorReason', '"TEST_ERROR"');
finishJSTest();
}
function requestSucceeded2(sd, source)
{
testFailed('requestSucceeded was called.');
finishJSTest();
}
function requestFailed1()
{
testFailed('requestFailed was called.');
finishJSTest();
}
function requestSucceeded1(sd, source)
{
testPassed('requestSucceeded was called.');
sessionDescription = sd;
shouldBe('sessionDescription.type', '"offer"');
pc.createOffer(requestSucceeded2, requestFailed2, {mandatory:{"succeed":false}});
}
pc = new webkitRTCPeerConnection(null, null);
pc.createOffer(requestSucceeded1, requestFailed1, {mandatory:{"succeed":true}});
window.jsTestIsAsync = true;
window.successfullyParsed = true;
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>
2012-09-04 Tommy Widenflycht <tommyw@google.com>
MediaStream API: Add the async createOffer functionality to RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=95734
Reviewed by Adam Barth.
* Platform.gypi:
* chromium/public/WebRTCPeerConnectionHandler.h:
(WebKit):
(WebRTCPeerConnectionHandler):
* chromium/public/WebRTCSessionDescriptionDescriptor.h: Added.
(WebCore):
(WebKit):
(WebRTCSessionDescriptionDescriptor):
(WebKit::WebRTCSessionDescriptionDescriptor::WebRTCSessionDescriptionDescriptor):
(WebKit::WebRTCSessionDescriptionDescriptor::~WebRTCSessionDescriptionDescriptor):
(WebKit::WebRTCSessionDescriptionDescriptor::operator=):
(WebKit::WebRTCSessionDescriptionDescriptor::isNull):
* chromium/public/WebRTCSessionDescriptionRequest.h: Added.
(WebCore):
(WebKit):
(WebRTCSessionDescriptionRequest):
(ExtraData):
(WebKit::WebRTCSessionDescriptionRequest::ExtraData::~ExtraData):
(WebKit::WebRTCSessionDescriptionRequest::WebRTCSessionDescriptionRequest):
(WebKit::WebRTCSessionDescriptionRequest::~WebRTCSessionDescriptionRequest):
(WebKit::WebRTCSessionDescriptionRequest::operator=):
(WebKit::WebRTCSessionDescriptionRequest::isNull):
2012-09-04 Tommy Widenflycht <tommyw@google.com>
MediaStream API: Change the MediaStreamTrackList track added/removed signaling
......
......@@ -94,6 +94,7 @@
'chromium/public/WebMessagePortChannelClient.h',
'chromium/public/WebMimeRegistry.h',
'chromium/public/WebNonCopyable.h',
'chromium/public/WebOfferAnswerRequest.h',
'chromium/public/WebPeerConnection00Handler.h',
'chromium/public/WebPeerConnection00HandlerClient.h',
'chromium/public/WebPeerConnectionHandler.h',
......@@ -107,6 +108,8 @@
'chromium/public/WebRTCICECandidateDescriptor.h',
'chromium/public/WebRTCPeerConnectionHandler.h',
'chromium/public/WebRTCPeerConnectionHandlerClient.h',
'chromium/public/WebRTCSessionDescriptionDescriptor.h',
'chromium/public/WebRTCSessionDescriptionRequest.h',
'chromium/public/WebRect.h',
'chromium/public/WebReferrerPolicy.h',
'chromium/public/WebRenderingStats.h',
......
......@@ -37,6 +37,8 @@ class WebMediaStreamDescriptor;
class WebRTCConfiguration;
class WebRTCICECandidateDescriptor;
class WebRTCPeerConnectionHandlerClient;
class WebRTCSessionDescriptionDescriptor;
class WebRTCSessionDescriptionRequest;
class WebRTCPeerConnectionHandler {
public:
......@@ -44,6 +46,7 @@ public:
virtual bool initialize(const WebRTCConfiguration&, const WebMediaConstraints&) = 0;
virtual void createOffer(const WebRTCSessionDescriptionRequest&, const WebMediaConstraints&) = 0;
virtual bool updateICE(const WebRTCConfiguration&, const WebMediaConstraints&) = 0;
virtual bool addICECandidate(const WebRTCICECandidateDescriptor&) = 0;
virtual bool addStream(const WebMediaStreamDescriptor&, const WebMediaConstraints&) = 0;
......
/*
* 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 WebRTCSessionDescriptionDescriptor_h
#define WebRTCSessionDescriptionDescriptor_h
#include "WebCommon.h"
#include "WebNonCopyable.h"
#include "WebPrivatePtr.h"
namespace WebCore {
class RTCSessionDescriptionDescriptor;
}
namespace WebKit {
class WebString;
// 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.
// FIXME: Invent less convoluted name.
class WebRTCSessionDescriptionDescriptor {
public:
WebRTCSessionDescriptionDescriptor() { }
WebRTCSessionDescriptionDescriptor(const WebRTCSessionDescriptionDescriptor& other) { assign(other); }
~WebRTCSessionDescriptionDescriptor() { reset(); }
WebRTCSessionDescriptionDescriptor& operator=(const WebRTCSessionDescriptionDescriptor& other)
{
assign(other);
return *this;
}
WEBKIT_EXPORT void assign(const WebRTCSessionDescriptionDescriptor&);
WEBKIT_EXPORT void initialize(const WebString& type, const WebString& sdp);
WEBKIT_EXPORT void reset();
bool isNull() const { return m_private.isNull(); }
WEBKIT_EXPORT WebString type() const;
WEBKIT_EXPORT void setType(const WebString&);
WEBKIT_EXPORT WebString sdp() const;
WEBKIT_EXPORT void setSDP(const WebString&);
#if WEBKIT_IMPLEMENTATION
WebRTCSessionDescriptionDescriptor(const WTF::PassRefPtr<WebCore::RTCSessionDescriptionDescriptor>&);
operator WTF::PassRefPtr<WebCore::RTCSessionDescriptionDescriptor>() const;
#endif
private:
WebPrivatePtr<WebCore::RTCSessionDescriptionDescriptor> m_private;
};
} // namespace WebKit
#endif // WebRTCSessionDescriptionDescriptor_h
/*
* 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 WebRTCSessionDescriptionRequest_h
#define WebRTCSessionDescriptionRequest_h
#include "WebCommon.h"
#include "WebNonCopyable.h"
#include "WebPrivatePtr.h"
#include "WebString.h"
namespace WebCore {
class RTCSessionDescriptionRequest;
}
namespace WebKit {
class WebRTCSessionDescriptionDescriptor;
class WebRTCSessionDescriptionRequest {
public:
class ExtraData {
public:
virtual ~ExtraData() { }
};
WebRTCSessionDescriptionRequest() { }
WebRTCSessionDescriptionRequest(const WebRTCSessionDescriptionRequest& other) { assign(other); }
~WebRTCSessionDescriptionRequest() { reset(); }
WebRTCSessionDescriptionRequest& operator=(const WebRTCSessionDescriptionRequest& other)
{
assign(other);
return *this;
}
WEBKIT_EXPORT void assign(const WebRTCSessionDescriptionRequest&);
WEBKIT_EXPORT void reset();
bool isNull() const { return m_private.isNull(); }
WEBKIT_EXPORT void requestSucceeded(const WebRTCSessionDescriptionDescriptor&) const;
WEBKIT_EXPORT void requestFailed(const WebString& error) const;
// Extra data associated with this object.
// If non-null, the extra data pointer will be deleted when the object is destroyed.
// Setting the extra data pointer will cause any existing non-null
// extra data pointer to be deleted.
WEBKIT_EXPORT ExtraData* extraData() const;
WEBKIT_EXPORT void setExtraData(ExtraData*);
#if WEBKIT_IMPLEMENTATION
WebRTCSessionDescriptionRequest(const WTF::PassRefPtr<WebCore::RTCSessionDescriptionRequest>&);
#endif
private:
WebPrivatePtr<WebCore::RTCSessionDescriptionRequest> m_private;
};
} // namespace WebKit
#endif // WebRTCSessionDescriptionRequest_h
......@@ -222,10 +222,12 @@ SET(WebCore_IDL_FILES
Modules/mediastream/NavigatorUserMediaErrorCallback.idl
Modules/mediastream/NavigatorUserMediaSuccessCallback.idl
Modules/mediastream/PeerConnection00.idl
Modules/mediastream/RTCErrorCallback.idl
Modules/mediastream/RTCIceCandidate.idl
Modules/mediastream/RTCIceCandidateEvent.idl
Modules/mediastream/RTCPeerConnection.idl
Modules/mediastream/RTCSessionDescription.idl
Modules/mediastream/RTCSessionDescriptionCallback.idl
Modules/mediastream/SessionDescription.idl
Modules/navigatorcontentutils/NavigatorContentUtils.idl
......@@ -859,6 +861,7 @@ SET(WebCore_SOURCES
Modules/mediastream/RTCIceCandidateEvent.cpp
Modules/mediastream/RTCPeerConnection.cpp
Modules/mediastream/RTCSessionDescription.cpp
Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp
Modules/mediastream/SessionDescription.cpp
Modules/mediastream/UserMediaController.cpp
Modules/mediastream/UserMediaRequest.cpp
......
2012-09-04 Tommy Widenflycht <tommyw@google.com>
MediaStream API: Add the async createOffer functionality to RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=95734
Reviewed by Adam Barth.
createOffer sends a request to the platform implementer requesting it to gather up all candidates.
This can take some time, therefore the request is async.
Test: fast/mediastream/RTCPeerConnection-createOffer.html
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/RTCErrorCallback.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
(WebCore):
(RTCErrorCallback):
(WebCore::RTCErrorCallback::~RTCErrorCallback):
* Modules/mediastream/RTCErrorCallback.idl: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createOffer):
(WebCore):
* Modules/mediastream/RTCPeerConnection.h:
(WebCore):
(RTCPeerConnection):
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescriptionCallback.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
(WebCore):
(RTCSessionDescriptionCallback):
(WebCore::RTCSessionDescriptionCallback::~RTCSessionDescriptionCallback):
* Modules/mediastream/RTCSessionDescriptionCallback.idl: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
* Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp: Added.
(WebCore):
(WebCore::RTCSessionDescriptionRequestImpl::create):
(WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
(WebCore::RTCSessionDescriptionRequestImpl::~RTCSessionDescriptionRequestImpl):
(WebCore::RTCSessionDescriptionRequestImpl::requestSucceeded):
(WebCore::RTCSessionDescriptionRequestImpl::requestFailed):
(WebCore::RTCSessionDescriptionRequestImpl::stop):
(WebCore::RTCSessionDescriptionRequestImpl::clear):
* Modules/mediastream/RTCSessionDescriptionRequestImpl.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
(WebCore):
(RTCSessionDescriptionRequestImpl):
* WebCore.gypi:
* platform/chromium/support/WebRTCSessionDescriptionDescriptor.cpp: Copied from Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h.
(WebKit):
(WebKit::WebRTCSessionDescriptionDescriptor::WebRTCSessionDescriptionDescriptor):
(WebKit::WebRTCSessionDescriptionDescriptor::assign):
(WebKit::WebRTCSessionDescriptionDescriptor::reset):
(WebKit::WebRTCSessionDescriptionDescriptor::operator WTF::PassRefPtr<WebCore::RTCSessionDescriptionDescriptor>):
(WebKit::WebRTCSessionDescriptionDescriptor::initialize):
(WebKit::WebRTCSessionDescriptionDescriptor::type):
(WebKit::WebRTCSessionDescriptionDescriptor::setType):
(WebKit::WebRTCSessionDescriptionDescriptor::sdp):
(WebKit::WebRTCSessionDescriptionDescriptor::setSDP):
* platform/chromium/support/WebRTCSessionDescriptionRequest.cpp: Added.
(WebKit):
(WebKit::WebRTCSessionDescriptionRequest::WebRTCSessionDescriptionRequest):
(WebKit::WebRTCSessionDescriptionRequest::assign):
(WebKit::WebRTCSessionDescriptionRequest::reset):
(WebKit::WebRTCSessionDescriptionRequest::requestSucceeded):
(WebKit::WebRTCSessionDescriptionRequest::requestFailed):
(ExtraDataContainer):
(WebKit::ExtraDataContainer::ExtraDataContainer):
(WebKit::ExtraDataContainer::extraData):
(WebKit::WebRTCSessionDescriptionRequest::extraData):
(WebKit::WebRTCSessionDescriptionRequest::setExtraData):
* platform/mediastream/RTCPeerConnectionHandler.cpp:
(RTCPeerConnectionHandlerDummy):
(WebCore::RTCPeerConnectionHandlerDummy::createOffer):
(WebCore):
* platform/mediastream/RTCPeerConnectionHandler.h:
(WebCore):
(RTCPeerConnectionHandler):
* platform/mediastream/RTCSessionDescriptionDescriptor.h:
(WebCore::RTCSessionDescriptionDescriptor::type):
(WebCore::RTCSessionDescriptionDescriptor::sdp):
* platform/mediastream/RTCSessionDescriptionRequest.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
(WebCore):
(RTCSessionDescriptionRequest):
(ExtraData):
(WebCore::RTCSessionDescriptionRequest::ExtraData::~ExtraData):
(WebCore::RTCSessionDescriptionRequest::~RTCSessionDescriptionRequest):
(WebCore::RTCSessionDescriptionRequest::extraData):
(WebCore::RTCSessionDescriptionRequest::setExtraData):
(WebCore::RTCSessionDescriptionRequest::RTCSessionDescriptionRequest):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
(WebCore::RTCPeerConnectionHandlerChromium::createOffer):
(WebCore):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
(RTCPeerConnectionHandlerChromium):
2012-09-04 Dan Bernstein <mitz@apple.com>
Reverted r127468 (the fix for <http://webkit.org/b/93443>) because the test it included caused
......@@ -627,6 +627,8 @@ webcore_built_sources += \
DerivedSources/WebCore/JSRequestAnimationFrameCallback.h \
DerivedSources/WebCore/JSRGBColor.cpp \
DerivedSources/WebCore/JSRGBColor.h \
DerivedSources/WebCore/JSRTCErrorCallback.cpp \
DerivedSources/WebCore/JSRTCErrorCallback.h \
DerivedSources/WebCore/JSRTCIceCandidate.cpp \
DerivedSources/WebCore/JSRTCIceCandidate.h \
DerivedSources/WebCore/JSRTCIceCandidateEvent.cpp \
......@@ -635,6 +637,8 @@ webcore_built_sources += \
DerivedSources/WebCore/JSRTCPeerConnection.h \
DerivedSources/WebCore/JSRTCSessionDescription.cpp \
DerivedSources/WebCore/JSRTCSessionDescription.h \
DerivedSources/WebCore/JSRTCSessionDescriptionCallback.cpp \
DerivedSources/WebCore/JSRTCSessionDescriptionCallback.h \
DerivedSources/WebCore/JSScreen.cpp \
DerivedSources/WebCore/JSScreen.h \
DerivedSources/WebCore/JSScriptProfile.cpp \
......@@ -1225,10 +1229,12 @@ dom_binding_idls += \
$(WebCore)/Modules/mediastream/NavigatorUserMediaErrorCallback.idl \
$(WebCore)/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl \
$(WebCore)/Modules/mediastream/PeerConnection00.idl \
$(WebCore)/Modules/mediastream/RTCErrorCallback.idl \
$(WebCore)/Modules/mediastream/RTCIceCandidate.idl \
$(WebCore)/Modules/mediastream/RTCIceCandidateEvent.idl \
$(WebCore)/Modules/mediastream/RTCPeerConnection.idl \
$(WebCore)/Modules/mediastream/RTCSessionDescription.idl \
$(WebCore)/Modules/mediastream/RTCSessionDescriptionCallback.idl \
$(WebCore)/Modules/mediastream/SessionDescription.idl \
$(WebCore)/Modules/navigatorcontentutils/NavigatorContentUtils.idl \
$(WebCore)/Modules/notifications/Notification.idl \
......@@ -1920,6 +1926,7 @@ webcore_modules_sources += \
Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.h \
Source/WebCore/Modules/mediastream/PeerConnection00.cpp \
Source/WebCore/Modules/mediastream/PeerConnection00.h \
Source/WebCore/Modules/mediastream/RTCErrorCallback.h \
Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp \
Source/WebCore/Modules/mediastream/RTCIceCandidate.h \
Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.cpp \
......@@ -1928,6 +1935,9 @@ webcore_modules_sources += \
Source/WebCore/Modules/mediastream/RTCPeerConnection.h \
Source/WebCore/Modules/mediastream/RTCSessionDescription.cpp \
Source/WebCore/Modules/mediastream/RTCSessionDescription.h \
Source/WebCore/Modules/mediastream/RTCSessionDescriptionCallback.h \
Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp \
Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.h \
Source/WebCore/Modules/mediastream/SessionDescription.cpp \
Source/WebCore/Modules/mediastream/SessionDescription.h \
Source/WebCore/Modules/mediastream/UserMediaClient.h \
......@@ -4554,6 +4564,7 @@ webcore_sources += \
Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.cpp \
Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h \
Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h \
Source/WebCore/platform/mediastream/RTCSessionDescriptionRequest.h \
Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.cpp \
Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h \
Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.cpp \
......
/*
* 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 RTCErrorCallback_h
#define RTCErrorCallback_h
#if ENABLE(MEDIA_STREAM)
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class RTCPeerConnection;
class RTCErrorCallback : public RefCounted<RTCErrorCallback> {
public:
virtual ~RTCErrorCallback() { }
virtual bool handleEvent(const String& errorInformation, RTCPeerConnection*) = 0;
};
} // namespace WebCore
#endif // ENABLE(MEDIA_STREAM)
#endif // RTCErrorCallback_h
/*
* 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,
Callback
] RTCErrorCallback {
boolean handleEvent(in DOMString errorInformation, in RTCPeerConnection source);
};
}
......@@ -40,9 +40,14 @@
#include "MediaConstraintsImpl.h"
#include "MediaStreamEvent.h"
#include "RTCConfiguration.h"
#include "RTCErrorCallback.h"
#include "RTCIceCandidate.h"
#include "RTCIceCandidateDescriptor.h"
#include "RTCIceCandidateEvent.h"
#include "RTCSessionDescription.h"
#include "RTCSessionDescriptionCallback.h"
#include "RTCSessionDescriptionDescriptor.h"
#include "RTCSessionDescriptionRequestImpl.h"
#include "ScriptExecutionContext.h"
namespace WebCore {
......@@ -130,6 +135,26 @@ RTCPeerConnection::~RTCPeerConnection()
{
}