OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WebRTCError_h |
| 6 #define WebRTCError_h |
| 7 |
| 8 // This header provides a Blink equivalent of webrtc::RTCError from |
| 9 // third_party/webrtc. It's used to communicate errors between Blink and the |
| 10 // WebRTCPeerConnectionHandler implementation. |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 enum class WebRTCErrorType { |
| 15 kNone, |
| 16 kUnsupportedParameter, |
| 17 kInvalidParameter, |
| 18 kInvalidRange, |
| 19 kSyntaxError, |
| 20 kInvalidState, |
| 21 kInvalidModification, |
| 22 kNetworkError, |
| 23 kInternalError, |
| 24 }; |
| 25 |
| 26 class BLINK_PLATFORM_EXPORT WebRTCError { |
| 27 public: |
| 28 WebRTCError() : m_type(WebRTCErrorType::kNone) {} |
| 29 explicit WebRTCError(WebRTCErrorType type) : m_type(type) {} |
| 30 |
| 31 WebRTCErrorType type() const { return m_type; } |
| 32 void setType(WebRTCErrorType type) { m_type = type; } |
| 33 |
| 34 private: |
| 35 WebRTCErrorType m_type; |
| 36 }; |
| 37 |
| 38 } // namespace blink |
| 39 |
| 40 #endif // WebRTCError_h |
OLD | NEW |