| 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..d9a636e2b46900c584755be75935bd2aa37eefe7
|
| --- /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 ErrorType {
|
| + DeviceError,
|
| + SecurityError,
|
| + ServiceError,
|
| + TransferError,
|
| + };
|
| +
|
| + WebUSBError(ErrorType errorType, const WebString& message)
|
| + : errorType(errorType)
|
| + , message(message)
|
| + {
|
| + }
|
| +
|
| + ErrorType errorType;
|
| + WebString message;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // WebUSBError_h
|
|
|