*/
#include "config.h"
-
#include "modules/mediastream/RTCSessionDescription.h"
-#include "bindings/v8/Dictionary.h"
-#include "bindings/v8/ExceptionState.h"
+#include "bindings/core/v8/Dictionary.h"
+#include "bindings/core/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
-namespace WebCore {
+namespace blink {
static bool verifyType(const String& type)
{
return "Illegal value of attribute 'type' : " + type;
}
-PassRefPtrWillBeRawPtr<RTCSessionDescription> RTCSessionDescription::create(const Dictionary& descriptionInitDict, ExceptionState& exceptionState)
+RTCSessionDescription* RTCSessionDescription::create(const Dictionary& descriptionInitDict, ExceptionState& exceptionState)
{
String type;
- bool ok = descriptionInitDict.get("type", type);
+ bool ok = DictionaryHelper::get(descriptionInitDict, "type", type);
if (ok && !verifyType(type)) {
exceptionState.throwDOMException(TypeMismatchError, constructIllegalTypeExceptionMessage(type));
return nullptr;
}
String sdp;
- descriptionInitDict.get("sdp", sdp);
+ DictionaryHelper::get(descriptionInitDict, "sdp", sdp);
- return adoptRefWillBeNoop(new RTCSessionDescription(blink::WebRTCSessionDescription(type, sdp)));
+ return new RTCSessionDescription(WebRTCSessionDescription(type, sdp));
}
-PassRefPtrWillBeRawPtr<RTCSessionDescription> RTCSessionDescription::create(blink::WebRTCSessionDescription webSessionDescription)
+RTCSessionDescription* RTCSessionDescription::create(WebRTCSessionDescription webSessionDescription)
{
- return adoptRefWillBeNoop(new RTCSessionDescription(webSessionDescription));
+ return new RTCSessionDescription(webSessionDescription);
}
-RTCSessionDescription::RTCSessionDescription(blink::WebRTCSessionDescription webSessionDescription)
+RTCSessionDescription::RTCSessionDescription(WebRTCSessionDescription webSessionDescription)
: m_webSessionDescription(webSessionDescription)
{
ScriptWrappable::init(this);
m_webSessionDescription.setSDP(sdp);
}
-blink::WebRTCSessionDescription RTCSessionDescription::webSessionDescription()
+WebRTCSessionDescription RTCSessionDescription::webSessionDescription()
{
return m_webSessionDescription;
}
-} // namespace WebCore
+} // namespace blink