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 13 matching lines...) Expand all Loading... |
24 switch (operation) { | 24 switch (operation) { |
25 case BluetoothOperation::kServicesRetrieval: | 25 case BluetoothOperation::kServicesRetrieval: |
26 operation_string = "retrieve services"; | 26 operation_string = "retrieve services"; |
27 break; | 27 break; |
28 case BluetoothOperation::kCharacteristicsRetrieval: | 28 case BluetoothOperation::kCharacteristicsRetrieval: |
29 operation_string = "retrieve characteristics"; | 29 operation_string = "retrieve characteristics"; |
30 break; | 30 break; |
31 case BluetoothOperation::kDescriptorsRetrieval: | 31 case BluetoothOperation::kDescriptorsRetrieval: |
32 operation_string = "retrieve descriptors"; | 32 operation_string = "retrieve descriptors"; |
33 break; | 33 break; |
34 case BluetoothOperation::GATT: | 34 case BluetoothOperation::kGATT: |
35 operation_string = "perform GATT operations"; | 35 operation_string = "perform GATT operations"; |
36 break; | 36 break; |
37 } | 37 } |
38 | 38 |
39 return DOMException::Create( | 39 return DOMException::Create( |
40 kNetworkError, | 40 kNetworkError, |
41 String::Format(kGATTServerNotConnectedBase, operation_string)); | 41 String::Format(kGATTServerNotConnectedBase, operation_string)); |
42 } | 42 } |
43 | 43 |
44 // static | 44 // static |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 "requestDevice() called from cross-origin iframe."); | 177 "requestDevice() called from cross-origin iframe."); |
178 | 178 |
179 #undef MAP_ERROR | 179 #undef MAP_ERROR |
180 } | 180 } |
181 | 181 |
182 NOTREACHED(); | 182 NOTREACHED(); |
183 return DOMException::Create(kUnknownError); | 183 return DOMException::Create(kUnknownError); |
184 } | 184 } |
185 | 185 |
186 } // namespace blink | 186 } // namespace blink |
OLD | NEW |