OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef WebUSBError_h | |
6 #define WebUSBError_h | |
7 | |
8 #include "public/platform/WebString.h" | |
9 | |
10 namespace blink { | |
11 | |
12 // Error object used to create DOMExceptions when a Web USB request cannot be | |
13 // satisfied. | |
14 struct WebUSBError { | |
15 enum class Error { | |
16 Device, | |
17 Security, | |
18 Service, | |
19 Transfer, | |
20 }; | |
21 | |
22 WebUSBError(Error error, const WebString& message) | |
23 : error(error) | |
24 , message(message) | |
25 { | |
26 } | |
27 | |
28 Error error; | |
29 WebString message; | |
30 }; | |
31 | |
32 } // namespace blink | |
33 | |
34 #endif // WebUSBError_h | |
OLD | NEW |