| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 module blink.mojom; | 4 module blink.mojom; |
| 5 | 5 |
| 6 // Errors that can occur during Web Bluetooth execution, which are transformed |
| 7 // to a DOMException in Source/modules/bluetooth/BluetoothError.cpp. |
| 8 // |
| 9 // These errors all produce constant message strings. If a particular message |
| 10 // needs a dynamic component, we should add a separate enum so type-checking the |
| 11 // IPC ensures the dynamic component is passed. |
| 6 enum WebBluetoothError { | 12 enum WebBluetoothError { |
| 7 SUCCESS | 13 SUCCESS, |
| 14 // AbortError: |
| 15 // InvalidModificationError: |
| 16 GATT_INVALID_ATTRIBUTE_LENGTH, |
| 17 // InvalidStateError: |
| 18 SERVICE_NO_LONGER_EXISTS, |
| 19 CHARACTERISTIC_NO_LONGER_EXISTS, |
| 20 // NetworkError: |
| 21 CONNECT_ALREADY_IN_PROGRESS, |
| 22 CONNECT_ATTRIBUTE_LENGTH_INVALID, |
| 23 CONNECT_AUTH_CANCELED, |
| 24 CONNECT_AUTH_FAILED, |
| 25 CONNECT_AUTH_REJECTED, |
| 26 CONNECT_AUTH_TIMEOUT, |
| 27 CONNECT_CONNECTION_CONGESTED, |
| 28 CONNECT_INSUFFICIENT_ENCRYPTION, |
| 29 CONNECT_OFFSET_INVALID, |
| 30 CONNECT_READ_NOT_PERMITTED, |
| 31 CONNECT_REQUEST_NOT_SUPPORTED, |
| 32 CONNECT_UNKNOWN_ERROR, |
| 33 CONNECT_UNKNOWN_FAILURE, |
| 34 CONNECT_UNSUPPORTED_DEVICE, |
| 35 CONNECT_WRITE_NOT_PERMITTED, |
| 36 DEVICE_NO_LONGER_IN_RANGE, |
| 37 GATT_NOT_PAIRED, |
| 38 GATT_OPERATION_IN_PROGRESS, |
| 39 UNTRANSLATED_CONNECT_ERROR_CODE, |
| 40 // NotFoundError: |
| 41 NO_BLUETOOTH_ADAPTER, |
| 42 CHOSEN_DEVICE_VANISHED, |
| 43 CHOOSER_CANCELLED, |
| 44 CHOOSER_DISABLED, |
| 45 CHOOSER_DENIED_PERMISSION, |
| 46 SERVICE_NOT_FOUND, |
| 47 CHARACTERISTIC_NOT_FOUND, |
| 48 NO_CHARACTERISTICS_FOUND, |
| 49 // NotSupportedError: |
| 50 GATT_UNKNOWN_ERROR, |
| 51 GATT_UNKNOWN_FAILURE, |
| 52 GATT_NOT_PERMITTED, |
| 53 GATT_NOT_SUPPORTED, |
| 54 GATT_UNTRANSLATED_ERROR_CODE, |
| 55 // SecurityError: |
| 56 GATT_NOT_AUTHORIZED, |
| 57 BLACKLISTED_CHARACTERISTIC_UUID, |
| 58 BLACKLISTED_READ, |
| 59 BLACKLISTED_WRITE, |
| 60 NOT_ALLOWED_TO_ACCESS_SERVICE, |
| 61 REQUEST_DEVICE_WITH_BLACKLISTED_UUID, |
| 62 REQUEST_DEVICE_WITH_UNIQUE_ORIGIN, |
| 63 REQUEST_DEVICE_WITHOUT_FRAME, |
| 64 // SyntaxError: |
| 65 // TODO(ortuno): Remove once we no longer use IPC. |
| 66 ENUM_MAX_VALUE = REQUEST_DEVICE_WITHOUT_FRAME, |
| 8 }; | 67 }; |
| 9 | 68 |
| 10 // TODO(ortuno): Define Bluetooth Service. | 69 // TODO(ortuno): Define Bluetooth Service. |
| 11 // https://crbug.com/508771 | 70 // https://crbug.com/508771 |
| OLD | NEW |