Index: third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestPromiseImpl.cpp |
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestPromiseImpl.cpp b/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestPromiseImpl.cpp |
deleted file mode 100644 |
index e4fe55a7113e7859b985fab6e96fdf07138449b9..0000000000000000000000000000000000000000 |
--- a/third_party/WebKit/Source/modules/mediastream/RTCSessionDescriptionRequestPromiseImpl.cpp |
+++ /dev/null |
@@ -1,73 +0,0 @@ |
-// Copyright 2016 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "modules/mediastream/RTCSessionDescriptionRequestPromiseImpl.h" |
- |
-#include "bindings/core/v8/ScriptPromiseResolver.h" |
-#include "core/dom/DOMException.h" |
-#include "core/dom/ExceptionCode.h" |
-#include "modules/mediastream/RTCPeerConnection.h" |
-#include "modules/mediastream/RTCSessionDescription.h" |
-#include "public/platform/WebRTCSessionDescription.h" |
- |
-namespace blink { |
- |
-RTCSessionDescriptionRequestPromiseImpl* RTCSessionDescriptionRequestPromiseImpl::create(RTCPeerConnection* requester, ScriptPromiseResolver* resolver) |
-{ |
- return new RTCSessionDescriptionRequestPromiseImpl(requester, resolver); |
-} |
- |
-RTCSessionDescriptionRequestPromiseImpl::RTCSessionDescriptionRequestPromiseImpl(RTCPeerConnection* requester, ScriptPromiseResolver* resolver) |
- : m_requester(requester) |
- , m_resolver(resolver) |
-{ |
- DCHECK(m_requester); |
- DCHECK(m_resolver); |
-} |
- |
-RTCSessionDescriptionRequestPromiseImpl::~RTCSessionDescriptionRequestPromiseImpl() |
-{ |
- DCHECK(!m_requester); |
-} |
- |
-void RTCSessionDescriptionRequestPromiseImpl::requestSucceeded(const WebRTCSessionDescription& webSessionDescription) |
-{ |
- if (m_requester && m_requester->shouldFireDefaultCallbacks()) { |
- m_resolver->resolve(RTCSessionDescription::create(webSessionDescription)); |
- } else { |
- // This is needed to have the resolver release its internal resources |
- // while leaving the associated promise pending as specified. |
- m_resolver->detach(); |
- } |
- |
- clear(); |
-} |
- |
-void RTCSessionDescriptionRequestPromiseImpl::requestFailed(const String& error) |
-{ |
- if (m_requester && m_requester->shouldFireDefaultCallbacks()) { |
- // TODO(guidou): The error code should come from the content layer. See crbug.com/589455 |
- m_resolver->reject(DOMException::create(OperationError, error)); |
- } else { |
- // This is needed to have the resolver release its internal resources |
- // while leaving the associated promise pending as specified. |
- m_resolver->detach(); |
- } |
- |
- clear(); |
-} |
- |
-void RTCSessionDescriptionRequestPromiseImpl::clear() |
-{ |
- m_requester.clear(); |
-} |
- |
-DEFINE_TRACE(RTCSessionDescriptionRequestPromiseImpl) |
-{ |
- visitor->trace(m_resolver); |
- visitor->trace(m_requester); |
- RTCSessionDescriptionRequest::trace(visitor); |
-} |
- |
-} // namespace blink |