fix: navigator.bluetooth.requestDevice (#27902)

* fix: navigator.bluetooth.requestDevice

* cleanup lint and add test

* update bluetooth test to handle no bluetooth adapter available

* update bluetooth test to handle bluetooth permission denied
This commit is contained in:
John Kleinschmidt 2021-02-26 14:10:27 -05:00 committed by GitHub
parent bd940b2904
commit d57fd6cef0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 269 additions and 2 deletions

View file

@ -1770,4 +1770,10 @@ content::SerialDelegate* ElectronBrowserClient::GetSerialDelegate() {
return serial_delegate_.get();
}
content::BluetoothDelegate* ElectronBrowserClient::GetBluetoothDelegate() {
if (!bluetooth_delegate_)
bluetooth_delegate_ = std::make_unique<ElectronBluetoothDelegate>();
return bluetooth_delegate_.get();
}
} // namespace electron