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 #include "WebCommon.h" |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 enum class WebRTCErrorType { |
| 17 kNone, |
| 18 kUnsupportedParameter, |
| 19 kInvalidParameter, |
| 20 kInvalidRange, |
| 21 kSyntaxError, |
| 22 kInvalidState, |
| 23 kInvalidModification, |
| 24 kNetworkError, |
| 25 kInternalError, |
| 26 }; |
| 27 |
| 28 class BLINK_PLATFORM_EXPORT WebRTCError { |
| 29 public: |
| 30 WebRTCError() : m_type(WebRTCErrorType::kNone) {} |
| 31 explicit WebRTCError(WebRTCErrorType type) : m_type(type) {} |
| 32 |
| 33 WebRTCErrorType type() const { return m_type; } |
| 34 void setType(WebRTCErrorType type) { m_type = type; } |
| 35 |
| 36 private: |
| 37 WebRTCErrorType m_type; |
| 38 }; |
| 39 |
| 40 } // namespace blink |
| 41 |
| 42 #endif // WebRTCError_h |
OLD | NEW |