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

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

Issue 1693433003: webusb: Reject the promise if the device is already open. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 InvalidState,
16 Network, 17 Network,
17 NotFound, 18 NotFound,
18 Security, 19 Security,
19 }; 20 };
20 21
21 WebUSBError(Error error, const WebString& message) 22 WebUSBError(Error error, const WebString& message)
22 : error(error) 23 : error(error)
23 , message(message) 24 , message(message)
24 { 25 {
25 } 26 }
26 27
27 Error error; 28 Error error;
28 WebString message; 29 WebString message;
29 }; 30 };
30 31
31 } // namespace blink 32 } // namespace blink
32 33
33 #endif // WebUSBError_h 34 #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