| 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 #ifndef BluetoothError_h | 5 #ifndef BluetoothError_h |
| 6 #define BluetoothError_h | 6 #define BluetoothError_h |
| 7 | 7 |
| 8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.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 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 // Used when generating DOMExceptions specific to each operation. | 14 // Used when generating DOMExceptions specific to each operation. |
| 15 // TODO(crbug.com/684445): Add DescriptorsRetrieval and GATTOperation. | 15 // TODO(crbug.com/684445): Add DescriptorsRetrieval. |
| 16 enum class BluetoothOperation { | 16 enum class BluetoothOperation { |
| 17 ServicesRetrieval, | 17 ServicesRetrieval, |
| 18 CharacteristicsRetrieval, | 18 CharacteristicsRetrieval, |
| 19 GATT, |
| 19 }; | 20 }; |
| 20 | 21 |
| 21 // These error codes requires detailed error messages. | 22 // These error codes requires detailed error messages. |
| 22 enum class BluetoothErrorCode { | 23 enum class BluetoothErrorCode { |
| 23 InvalidService, | 24 InvalidService, |
| 24 InvalidCharacteristic, | 25 InvalidCharacteristic, |
| 25 InvalidDescriptor, | 26 InvalidDescriptor, |
| 26 ServiceNotFound, | 27 ServiceNotFound, |
| 27 CharacteristicNotFound, | 28 CharacteristicNotFound, |
| 28 DescriptorNotFound | 29 DescriptorNotFound |
| (...skipping 11 matching lines...) Expand all Loading... |
| 40 static DOMException* createDOMException(BluetoothErrorCode, | 41 static DOMException* createDOMException(BluetoothErrorCode, |
| 41 const String& detailedMessage); | 42 const String& detailedMessage); |
| 42 | 43 |
| 43 static DOMException* createDOMException( | 44 static DOMException* createDOMException( |
| 44 mojom::blink::WebBluetoothResult error); | 45 mojom::blink::WebBluetoothResult error); |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 } // namespace blink | 48 } // namespace blink |
| 48 | 49 |
| 49 #endif // BluetoothError_h | 50 #endif // BluetoothError_h |
| OLD | NEW |