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 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 MAP_ERROR(GATT_UNKNOWN_FAILURE, NotSupportedError, "GATT operation faile
d for unknown reason."); | 64 MAP_ERROR(GATT_UNKNOWN_FAILURE, NotSupportedError, "GATT operation faile
d for unknown reason."); |
65 MAP_ERROR(GATT_NOT_PERMITTED, NotSupportedError, "GATT operation not per
mitted."); | 65 MAP_ERROR(GATT_NOT_PERMITTED, NotSupportedError, "GATT operation not per
mitted."); |
66 MAP_ERROR(GATT_NOT_SUPPORTED, NotSupportedError, "GATT Error: Not suppor
ted."); | 66 MAP_ERROR(GATT_NOT_SUPPORTED, NotSupportedError, "GATT Error: Not suppor
ted."); |
67 MAP_ERROR(GATT_UNTRANSLATED_ERROR_CODE, NotSupportedError, "GATT Error:
Unknown GattErrorCode."); | 67 MAP_ERROR(GATT_UNTRANSLATED_ERROR_CODE, NotSupportedError, "GATT Error:
Unknown GattErrorCode."); |
68 | 68 |
69 // SecurityErrors: | 69 // SecurityErrors: |
70 MAP_ERROR(GATT_NOT_AUTHORIZED, SecurityError, "GATT operation not author
ized."); | 70 MAP_ERROR(GATT_NOT_AUTHORIZED, SecurityError, "GATT operation not author
ized."); |
71 MAP_ERROR(BLACKLISTED_CHARACTERISTIC_UUID, SecurityError, "getCharacteri
stic(s) called with blacklisted UUID. https://goo.gl/4NeimX"); | 71 MAP_ERROR(BLACKLISTED_CHARACTERISTIC_UUID, SecurityError, "getCharacteri
stic(s) called with blacklisted UUID. https://goo.gl/4NeimX"); |
72 MAP_ERROR(BLACKLISTED_READ, SecurityError, "readValue() called on blackl
isted object marked exclude-reads. https://goo.gl/4NeimX"); | 72 MAP_ERROR(BLACKLISTED_READ, SecurityError, "readValue() called on blackl
isted object marked exclude-reads. https://goo.gl/4NeimX"); |
73 MAP_ERROR(BLACKLISTED_WRITE, SecurityError, "writeValue() called on blac
klisted object marked exclude-writes. https://goo.gl/4NeimX"); | 73 MAP_ERROR(BLACKLISTED_WRITE, SecurityError, "writeValue() called on blac
klisted object marked exclude-writes. https://goo.gl/4NeimX"); |
74 MAP_ERROR(NOT_ALLOWED_TO_ACCESS_SERVICE, SecurityError, "Origin is not a
llowed to access the service. Remember to add the service to a filter or to opti
onalServices in requestDevice()."); | 74 MAP_ERROR(NOT_ALLOWED_TO_ACCESS_SERVICE, SecurityError, "Origin is not a
llowed to access the service. Tip: Add the service UUID to 'optionalServices' in
requestDevice() options. https://goo.gl/HxfxSQ"); |
75 MAP_ERROR(REQUEST_DEVICE_WITH_BLACKLISTED_UUID, SecurityError, "requestD
evice() called with a filter containing a blacklisted UUID. https://goo.gl/4Neim
X"); | 75 MAP_ERROR(REQUEST_DEVICE_WITH_BLACKLISTED_UUID, SecurityError, "requestD
evice() called with a filter containing a blacklisted UUID. https://goo.gl/4Neim
X"); |
76 MAP_ERROR(REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME, SecurityError, "reque
stDevice() called from cross-origin iframe."); | 76 MAP_ERROR(REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME, SecurityError, "reque
stDevice() called from cross-origin iframe."); |
77 MAP_ERROR(REQUEST_DEVICE_WITHOUT_FRAME, SecurityError, "No window to sho
w the requestDevice() dialog."); | 77 MAP_ERROR(REQUEST_DEVICE_WITHOUT_FRAME, SecurityError, "No window to sho
w the requestDevice() dialog."); |
78 | 78 |
79 #undef MAP_ERROR | 79 #undef MAP_ERROR |
80 } | 80 } |
81 | 81 |
82 ASSERT_NOT_REACHED(); | 82 ASSERT_NOT_REACHED(); |
83 return DOMException::create(UnknownError); | 83 return DOMException::create(UnknownError); |
84 } | 84 } |
85 | 85 |
86 } // namespace blink | 86 } // namespace blink |
OLD | NEW |