Index: third_party/WebKit/Source/modules/bluetooth/BluetoothError.h |
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h |
index c9374283b4cf3b0de64c4c7daa985b68ac74b147..8e989506173e4a1c83b04068bf790a9a1e140bdb 100644 |
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h |
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h |
@@ -11,8 +11,17 @@ |
namespace blink { |
+// These error codes requires detailed error messages. |
+enum class BluetoothErrorCode { |
+ InvalidService, |
+ InvalidCharacteristic, |
+ InvalidDescriptor, |
+ ServiceNotFound, |
+ CharacteristicNotFound, |
+ DescriptorNotFound |
+}; |
+ |
class DOMException; |
-class ScriptPromiseResolver; |
// BluetoothError is used with CallbackPromiseAdapter to receive |
// WebBluetoothResult responses. See CallbackPromiseAdapter class comments. |
@@ -20,9 +29,11 @@ class BluetoothError { |
STATIC_ONLY(BluetoothError); |
public: |
- // Interface required by CallbackPromiseAdapter: |
- static DOMException* take(ScriptPromiseResolver*, |
- mojom::blink::WebBluetoothResult); |
+ static DOMException* createDOMException(BluetoothErrorCode, |
+ const String& detailedMessage); |
+ |
+ static DOMException* createDOMException( |
+ mojom::blink::WebBluetoothResult error); |
}; |
} // namespace blink |