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 |