Chromium Code Reviews| 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); |
|
haraken
2015/07/31 08:58:25
Can we use STATIC_ONLY()?
Ken Rockot(use gerrit already)
2015/07/31 16:19:26
Done.
|
| +public: |
| + // Interface required by CallbackPromiseAdapter: |
| + using WebType = WebUSBError; |
| + static DOMException* take(ScriptPromiseResolver*, PassOwnPtr<WebUSBError>); |
| + |
| +private: |
| + USBError() = delete; |
|
haraken
2015/07/31 08:58:25
Then we can remove this.
Ken Rockot(use gerrit already)
2015/07/31 16:19:26
Done.
|
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // USBError_h |