Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: third_party/WebKit/Source/modules/mediastream/RTCVoidRequestPromiseImpl.h

Issue 1661493002: Add promise-based addIceCandidate, setLocalDescription and setRemoteDescription to RTCPeerConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: philipj's comments on tests Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/mediastream/RTCVoidRequestPromiseImpl.h
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestPromiseImpl.h b/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestPromiseImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..ca058d442ecdec4b941ceeef751e6a5950f8f001
--- /dev/null
+++ b/third_party/WebKit/Source/modules/mediastream/RTCVoidRequestPromiseImpl.h
@@ -0,0 +1,40 @@
+// 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.
+
+#ifndef RTCVoidRequestPromiseImpl_h
+#define RTCVoidRequestPromiseImpl_h
+
+#include "core/dom/ExceptionCode.h"
+#include "platform/mediastream/RTCVoidRequest.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class ScriptPromiseResolver;
+class RTCPeerConnection;
+
+class RTCVoidRequestPromiseImpl final : public RTCVoidRequest {
+public:
+ static RTCVoidRequestPromiseImpl* create(RTCPeerConnection*, ScriptPromiseResolver*, ExceptionCode);
+ ~RTCVoidRequestPromiseImpl() override;
+
+ // RTCVoidRequest
+ void requestSucceeded() override;
+ void requestFailed(const String& error) override;
+
+ DECLARE_VIRTUAL_TRACE();
+
+private:
+ RTCVoidRequestPromiseImpl(RTCPeerConnection*, ScriptPromiseResolver*, ExceptionCode);
+
+ void clear();
+
+ Member<RTCPeerConnection> m_requester;
+ Member<ScriptPromiseResolver> m_resolver;
+ ExceptionCode m_exceptionCode;
+};
+
+} // namespace blink
+
+#endif // RTCVoidRequestPromiseImpl_h

Powered by Google App Engine
This is Rietveld 408576698