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

Unified Diff: content/browser/bluetooth/bluetooth_device_chooser_controller.cc

Issue 2030973002: bluetooth: Handle two consecutives requestDevice calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Improve comment Created 4 years, 6 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
« no previous file with comments | « no previous file | content/browser/bluetooth/web_bluetooth_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/bluetooth/bluetooth_device_chooser_controller.cc
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
index 16a3630a279531bd04e2738d10730221c5675934..ace8433f9069e55717551e98629064712d33249f 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -218,7 +218,12 @@ BluetoothDeviceChooserController::BluetoothDeviceChooserController(
CHECK(adapter_);
}
-BluetoothDeviceChooserController::~BluetoothDeviceChooserController() {}
+BluetoothDeviceChooserController::~BluetoothDeviceChooserController() {
+ if (chooser_) {
+ DCHECK(!error_callback_.is_null());
+ error_callback_.Run(blink::mojom::WebBluetoothError::CHOOSER_CANCELLED);
+ }
+}
void BluetoothDeviceChooserController::GetDevice(
blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
« no previous file with comments | « no previous file | content/browser/bluetooth/web_bluetooth_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698