diff options
Diffstat (limited to 'chromium/chrome/browser/resources/bluetooth_internals/adapter_broker.js')
-rw-r--r-- | chromium/chrome/browser/resources/bluetooth_internals/adapter_broker.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chromium/chrome/browser/resources/bluetooth_internals/adapter_broker.js b/chromium/chrome/browser/resources/bluetooth_internals/adapter_broker.js index 0da84a773fe..1ca5ea685c5 100644 --- a/chromium/chrome/browser/resources/bluetooth_internals/adapter_broker.js +++ b/chromium/chrome/browser/resources/bluetooth_internals/adapter_broker.js @@ -154,15 +154,18 @@ cr.define('adapter_broker', function() { /** * Initializes an AdapterBroker if one doesn't exist. + * @param {!mojom.BluetoothInternalsHandlerRemote=} + * opt_bluetoothInternalsHandler * @return {!Promise<!adapter_broker.AdapterBroker>} resolves with * AdapterBroker, rejects if Bluetooth is not supported. */ - function getAdapterBroker() { + function getAdapterBroker(opt_bluetoothInternalsHandler) { if (adapterBroker) { return Promise.resolve(adapterBroker); } - const bluetoothInternalsHandler = + const bluetoothInternalsHandler = opt_bluetoothInternalsHandler ? + opt_bluetoothInternalsHandler : mojom.BluetoothInternalsHandler.getRemote(); // Get an Adapter service. |