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 10 matching lines...) Expand all Loading... |
21 DOMException* BluetoothError::createNotConnectedException( | 21 DOMException* BluetoothError::createNotConnectedException( |
22 BluetoothOperation operation) { | 22 BluetoothOperation operation) { |
23 const char* operationString = nullptr; | 23 const char* operationString = nullptr; |
24 switch (operation) { | 24 switch (operation) { |
25 case BluetoothOperation::ServicesRetrieval: | 25 case BluetoothOperation::ServicesRetrieval: |
26 operationString = "retrieve services"; | 26 operationString = "retrieve services"; |
27 break; | 27 break; |
28 case BluetoothOperation::CharacteristicsRetrieval: | 28 case BluetoothOperation::CharacteristicsRetrieval: |
29 operationString = "retrieve characteristics"; | 29 operationString = "retrieve characteristics"; |
30 break; | 30 break; |
| 31 case BluetoothOperation::DescriptorsRetrieval: |
| 32 operationString = "retrieve descriptors"; |
| 33 break; |
31 case BluetoothOperation::GATT: | 34 case BluetoothOperation::GATT: |
32 operationString = "perform GATT operations"; | 35 operationString = "perform GATT operations"; |
33 break; | 36 break; |
34 } | 37 } |
35 | 38 |
36 return DOMException::create( | 39 return DOMException::create( |
37 NetworkError, | 40 NetworkError, |
38 String::format(kGATTServerNotConnectedBase, operationString)); | 41 String::format(kGATTServerNotConnectedBase, operationString)); |
39 } | 42 } |
40 | 43 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 "requestDevice() called from cross-origin iframe."); | 194 "requestDevice() called from cross-origin iframe."); |
192 | 195 |
193 #undef MAP_ERROR | 196 #undef MAP_ERROR |
194 } | 197 } |
195 | 198 |
196 NOTREACHED(); | 199 NOTREACHED(); |
197 return DOMException::create(UnknownError); | 200 return DOMException::create(UnknownError); |
198 } | 201 } |
199 | 202 |
200 } // namespace blink | 203 } // namespace blink |
OLD | NEW |