Chromium Code Reviews| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 // NotSupportedErrors: | 55 // NotSupportedErrors: |
| 56 MAP_ERROR(GATTUnknownError, NotSupportedError, "GATT Error Unknown."); | 56 MAP_ERROR(GATTUnknownError, NotSupportedError, "GATT Error Unknown."); |
| 57 MAP_ERROR(GATTUnknownFailure, NotSupportedError, "GATT operation failed for unknown reason."); | 57 MAP_ERROR(GATTUnknownFailure, NotSupportedError, "GATT operation failed for unknown reason."); |
| 58 MAP_ERROR(GATTNotPermitted, NotSupportedError, "GATT operation not permi tted."); | 58 MAP_ERROR(GATTNotPermitted, NotSupportedError, "GATT operation not permi tted."); |
| 59 MAP_ERROR(GATTNotSupported, NotSupportedError, "GATT Error: Not supporte d."); | 59 MAP_ERROR(GATTNotSupported, NotSupportedError, "GATT Error: Not supporte d."); |
| 60 MAP_ERROR(GATTUntranslatedErrorCode, NotSupportedError, "GATT Error: Unk nown GattErrorCode."); | 60 MAP_ERROR(GATTUntranslatedErrorCode, NotSupportedError, "GATT Error: Unk nown GattErrorCode."); |
| 61 | 61 |
| 62 // SecurityErrors: | 62 // SecurityErrors: |
| 63 MAP_ERROR(GATTNotAuthorized, SecurityError, "GATT operation not authoriz ed."); | 63 MAP_ERROR(GATTNotAuthorized, SecurityError, "GATT operation not authoriz ed."); |
| 64 MAP_ERROR(NotAllowedToAccessService, SecurityError, "Origin is not allow ed to access the service. Remember to add the service to a filter or to optional Services in requestDevice()."); | 64 MAP_ERROR(NotAllowedToAccessService, SecurityError, "Origin is not allow ed to access the service. Remember to add the service to a filter or to optional Services in requestDevice()."); |
| 65 MAP_ERROR(RequestDeviceWithBlacklistedUUID, SecurityError, "requestDevic e() called with a filter containing a blacklisted UUID."); | |
|
ortuno
2016/02/12 16:41:47
Should we add a link to the spec that explains why
scheib
2016/02/12 18:25:32
Done.
| |
| 65 MAP_ERROR(RequestDeviceWithUniqueOrigin, SecurityError, "requestDevice() called from sandboxed or otherwise unique origin."); | 66 MAP_ERROR(RequestDeviceWithUniqueOrigin, SecurityError, "requestDevice() called from sandboxed or otherwise unique origin."); |
| 66 MAP_ERROR(RequestDeviceWithoutFrame, SecurityError, "No window to show t he requestDevice() dialog."); | 67 MAP_ERROR(RequestDeviceWithoutFrame, SecurityError, "No window to show t he requestDevice() dialog."); |
| 67 | 68 |
| 68 #undef MAP_ERROR | 69 #undef MAP_ERROR |
| 69 } | 70 } |
| 70 | 71 |
| 71 ASSERT_NOT_REACHED(); | 72 ASSERT_NOT_REACHED(); |
| 72 return DOMException::create(UnknownError); | 73 return DOMException::create(UnknownError); |
| 73 } | 74 } |
| 74 | 75 |
| 75 } // namespace blink | 76 } // namespace blink |
| OLD | NEW |