Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothError.h

Issue 2721233002: bluetooth: Better disconnected error messages for characteristic retrieval. (Closed)
Patch Set: Address dcheng's comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698