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

Unified Diff: third_party/WebKit/public/platform/WebRTCError.h

Issue 2631433002: Rename RTCPeerConnection.updateIce to setConfiguration and make it work. (Closed)
Patch Set: Fixing mock PC handler, using DCHECK for default case in switch statement Created 3 years, 11 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/public/platform/WebRTCError.h
diff --git a/third_party/WebKit/public/platform/WebRTCError.h b/third_party/WebKit/public/platform/WebRTCError.h
new file mode 100644
index 0000000000000000000000000000000000000000..0a9767a1ec973cc44204b396722ff9898cf20ed4
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebRTCError.h
@@ -0,0 +1,40 @@
+// Copyright 2017 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 WebRTCError_h
+#define WebRTCError_h
+
+// This header provides a Blink equivalent of webrtc::RTCError from
+// third_party/webrtc. It's used to communicate errors between Blink and the
+// WebRTCPeerConnectionHandler implementation.
+
+namespace blink {
+
+enum class WebRTCErrorType {
+ kNone,
+ kUnsupportedParameter,
+ kInvalidParameter,
+ kInvalidRange,
+ kSyntaxError,
+ kInvalidState,
+ kInvalidModification,
+ kNetworkError,
+ kInternalError,
+};
+
+class BLINK_PLATFORM_EXPORT WebRTCError {
+ public:
+ WebRTCError() : m_type(WebRTCErrorType::kNone) {}
+ explicit WebRTCError(WebRTCErrorType type) : m_type(type) {}
+
+ WebRTCErrorType type() const { return m_type; }
+ void setType(WebRTCErrorType type) { m_type = type; }
+
+ private:
+ WebRTCErrorType m_type;
+};
+
+} // namespace blink
+
+#endif // WebRTCError_h

Powered by Google App Engine
This is Rietveld 408576698