| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebUSBError_h | 5 #ifndef WebUSBError_h |
| 6 #define WebUSBError_h | 6 #define WebUSBError_h |
| 7 | 7 |
| 8 #include "public/platform/WebString.h" | 8 #include "public/platform/WebString.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 // Error object used to create DOMExceptions when a Web USB request cannot be | 12 // Error object used to create DOMExceptions when a Web USB request cannot be |
| 13 // satisfied. | 13 // satisfied. |
| 14 struct WebUSBError { | 14 struct WebUSBError { |
| 15 enum class Error { | 15 enum class Error { |
| 16 Device, | 16 Network, |
| 17 NotFound, |
| 17 Security, | 18 Security, |
| 18 Service, | |
| 19 Transfer, | |
| 20 }; | 19 }; |
| 21 | 20 |
| 22 WebUSBError(Error error, const WebString& message) | 21 WebUSBError(Error error, const WebString& message) |
| 23 : error(error) | 22 : error(error) |
| 24 , message(message) | 23 , message(message) |
| 25 { | 24 { |
| 26 } | 25 } |
| 27 | 26 |
| 28 Error error; | 27 Error error; |
| 29 WebString message; | 28 WebString message; |
| 30 }; | 29 }; |
| 31 | 30 |
| 32 } // namespace blink | 31 } // namespace blink |
| 33 | 32 |
| 34 #endif // WebUSBError_h | 33 #endif // WebUSBError_h |
| OLD | NEW |