| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 | 4 |
| 5 #include "modules/bluetooth/BluetoothError.h" | 5 #include "modules/bluetooth/BluetoothError.h" |
| 6 | 6 |
| 7 #include "core/dom/DOMException.h" | 7 #include "core/dom/DOMException.h" |
| 8 #include "core/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" |
| 9 #include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.moj
om-blink.h" | 9 #include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.moj
om-blink.h" |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 CHOOSER_NOT_SHOWN_USER_DENIED_PERMISSION_TO_SCAN, NotFoundError, | 88 CHOOSER_NOT_SHOWN_USER_DENIED_PERMISSION_TO_SCAN, NotFoundError, |
| 89 "User denied the browser permission to scan for Bluetooth devices."); | 89 "User denied the browser permission to scan for Bluetooth devices."); |
| 90 MAP_ERROR(SERVICE_NOT_FOUND, NotFoundError, | 90 MAP_ERROR(SERVICE_NOT_FOUND, NotFoundError, |
| 91 "No Services with specified UUID found in Device."); | 91 "No Services with specified UUID found in Device."); |
| 92 MAP_ERROR(NO_SERVICES_FOUND, NotFoundError, | 92 MAP_ERROR(NO_SERVICES_FOUND, NotFoundError, |
| 93 "No Services found in device."); | 93 "No Services found in device."); |
| 94 MAP_ERROR(CHARACTERISTIC_NOT_FOUND, NotFoundError, | 94 MAP_ERROR(CHARACTERISTIC_NOT_FOUND, NotFoundError, |
| 95 "No Characteristics with specified UUID found in Service."); | 95 "No Characteristics with specified UUID found in Service."); |
| 96 MAP_ERROR(NO_CHARACTERISTICS_FOUND, NotFoundError, | 96 MAP_ERROR(NO_CHARACTERISTICS_FOUND, NotFoundError, |
| 97 "No Characteristics found in service."); | 97 "No Characteristics found in service."); |
| 98 MAP_ERROR(BLUETOOTH_LOW_ENERGY_NOT_AVAILABLE, NotFoundError, |
| 99 "Bluetooth Low Energy not available."); |
| 98 | 100 |
| 99 // NotSupportedErrors: | 101 // NotSupportedErrors: |
| 100 MAP_ERROR(GATT_UNKNOWN_ERROR, NotSupportedError, "GATT Error Unknown."); | 102 MAP_ERROR(GATT_UNKNOWN_ERROR, NotSupportedError, "GATT Error Unknown."); |
| 101 MAP_ERROR(GATT_UNKNOWN_FAILURE, NotSupportedError, | 103 MAP_ERROR(GATT_UNKNOWN_FAILURE, NotSupportedError, |
| 102 "GATT operation failed for unknown reason."); | 104 "GATT operation failed for unknown reason."); |
| 103 MAP_ERROR(GATT_NOT_PERMITTED, NotSupportedError, | 105 MAP_ERROR(GATT_NOT_PERMITTED, NotSupportedError, |
| 104 "GATT operation not permitted."); | 106 "GATT operation not permitted."); |
| 105 MAP_ERROR(GATT_NOT_SUPPORTED, NotSupportedError, | 107 MAP_ERROR(GATT_NOT_SUPPORTED, NotSupportedError, |
| 106 "GATT Error: Not supported."); | 108 "GATT Error: Not supported."); |
| 107 MAP_ERROR(GATT_UNTRANSLATED_ERROR_CODE, NotSupportedError, | 109 MAP_ERROR(GATT_UNTRANSLATED_ERROR_CODE, NotSupportedError, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 132 "No window to show the requestDevice() dialog."); | 134 "No window to show the requestDevice() dialog."); |
| 133 | 135 |
| 134 #undef MAP_ERROR | 136 #undef MAP_ERROR |
| 135 } | 137 } |
| 136 | 138 |
| 137 ASSERT_NOT_REACHED(); | 139 ASSERT_NOT_REACHED(); |
| 138 return DOMException::create(UnknownError); | 140 return DOMException::create(UnknownError); |
| 139 } | 141 } |
| 140 | 142 |
| 141 } // namespace blink | 143 } // namespace blink |
| OLD | NEW |