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

Unified Diff: Source/modules/bluetooth/BluetoothError.cpp

Issue 1293593003: Add errors for various chooser failure modes, and remove assertions that are about to change. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Sync Created 5 years, 4 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: Source/modules/bluetooth/BluetoothError.cpp
diff --git a/Source/modules/bluetooth/BluetoothError.cpp b/Source/modules/bluetooth/BluetoothError.cpp
index d953d6e02258e828aecfd3e1883e0f6d02ecec52..6e5c28dbcbbfac6ef26c537ee224db0346b7809b 100644
--- a/Source/modules/bluetooth/BluetoothError.cpp
+++ b/Source/modules/bluetooth/BluetoothError.cpp
@@ -41,8 +41,11 @@ DOMException* BluetoothError::take(ScriptPromiseResolver*, const WebBluetoothErr
// NotFoundErrors:
MAP_ERROR(BluetoothAdapterOff, NotFoundError, "Bluetooth adapter is off.");
MAP_ERROR(NoBluetoothAdapter, NotFoundError, "Bluetooth adapter not available.");
+ MAP_ERROR(NoBluetoothChooser, NotFoundError, "Can't show Bluetooth chooser dialog.");
MAP_ERROR(DiscoverySessionStartFailed, NotFoundError, "Couldn't start discovery session.");
MAP_ERROR(DiscoverySessionStopFailed, NotFoundError, "Failed to stop discovery session.");
+ MAP_ERROR(ChosenDeviceVanished, NotFoundError, "User selected a device that doesn't exist anymore.");
+ MAP_ERROR(ChooserCancelled, NotFoundError, "User cancelled the requestDevice() chooser.");
MAP_ERROR(NoDevicesFound, NotFoundError, "No Bluetooth devices in range.");
MAP_ERROR(ServiceNotFound, NotFoundError, "Service not found in device.");
MAP_ERROR(CharacteristicNotFound, NotFoundError, "Characteristic not found in device.");
« no previous file with comments | « LayoutTests/bluetooth/resources/bluetooth-helpers.js ('k') | public/platform/modules/bluetooth/WebBluetoothError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698