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

Unified Diff: Source/modules/webusb/USBError.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
« no previous file with comments | « Source/modules/webusb/USBDevice.idl ('k') | Source/modules/webusb/USBError.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webusb/USBError.h
diff --git a/Source/modules/webusb/USBError.h b/Source/modules/webusb/USBError.h
new file mode 100644
index 0000000000000000000000000000000000000000..9fe0043a91f1c8584ab8bfcba39fbccf1c2ce1a1
--- /dev/null
+++ b/Source/modules/webusb/USBError.h
@@ -0,0 +1,32 @@
+// 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 USBError_h
+#define USBError_h
+
+#include "platform/heap/Handle.h"
+#include "public/platform/modules/webusb/WebUSBError.h"
+#include "wtf/PassOwnPtr.h"
+
+namespace blink {
+
+class DOMException;
+class ScriptPromiseResolver;
+
+// USBError is used with CallbackPromiseAdapter to receive WebUSBError
+// responses. See CallbackPromiseAdapter class comments.
+class USBError {
+ WTF_MAKE_NONCOPYABLE(USBError);
+public:
+ // Interface required by CallbackPromiseAdapter:
+ using WebType = WebUSBError;
+ static DOMException* take(ScriptPromiseResolver*, PassOwnPtr<WebUSBError>);
+
+private:
+ USBError() = delete;
+};
+
+} // namespace blink
+
+#endif // USBError_h
« no previous file with comments | « Source/modules/webusb/USBDevice.idl ('k') | Source/modules/webusb/USBError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698