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

Unified Diff: public/platform/modules/webusb/WebUSBError.h

Issue 1264483005: Add WebUSB bindings and client interface [part 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: enum class Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: public/platform/modules/webusb/WebUSBError.h
diff --git a/public/platform/modules/webusb/WebUSBError.h b/public/platform/modules/webusb/WebUSBError.h
new file mode 100644
index 0000000000000000000000000000000000000000..6bc06bbe504079fa6013ccdf516c818d112ae47c
--- /dev/null
+++ b/public/platform/modules/webusb/WebUSBError.h
@@ -0,0 +1,34 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebUSBError_h
+#define WebUSBError_h
+
+#include "public/platform/WebString.h"
+
+namespace blink {
+
+// Error object used to create DOMExceptions when a Web USB request cannot be
+// satisfied.
+struct WebUSBError {
+ enum class Error {
+ Device,
+ Security,
+ Service,
+ Transfer,
+ };
+
+ WebUSBError(Error error, const WebString& message)
+ : error(error)
+ , message(message)
+ {
+ }
+
+ Error error;
+ WebString message;
+};
+
+} // namespace blink
+
+#endif // WebUSBError_h
« no previous file with comments | « public/platform/modules/webusb/WebUSBDeviceInfo.h ('k') | public/platform/modules/webusb/WebUSBTransferInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698