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

Side by Side Diff: third_party/WebKit/public/platform/modules/webusb/WebUSBError.h

Issue 1521803002: Match WebUSB errors more closely to the specificiation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USBError.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USBError.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698