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 8e989506173e4a1c83b04068bf790a9a1e140bdb..9ebdd14284a49ff2d4aec7063edef7dd1510b747 100644 |
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h |
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h |
@@ -11,6 +11,13 @@ |
namespace blink { |
+// Used when generating DOMExceptions specific to each operation. |
+// TODO(crbug.com/684445): Add DescriptorsRetrieval and GATTOperation. |
+enum class BluetoothOperation { |
+ ServicesRetrieval, |
+ CharacteristicsRetrieval, |
+}; |
+ |
// These error codes requires detailed error messages. |
enum class BluetoothErrorCode { |
InvalidService, |
@@ -29,6 +36,7 @@ class BluetoothError { |
STATIC_ONLY(BluetoothError); |
public: |
+ static DOMException* createNotConnectedException(BluetoothOperation); |
static DOMException* createDOMException(BluetoothErrorCode, |
const String& detailedMessage); |