| Index: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js
|
| diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js
|
| index 9d44d68ea6778089b4ff7d58a37b0e7c056a785b..bbddbaf3246aa21e41e6295870d05028349b0717 100644
|
| --- a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js
|
| +++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js
|
| @@ -37,8 +37,8 @@ settings.BluetoothAddDeviceBehavior = {
|
|
|
| /** @private */
|
| adapterStateChanged_: function() {
|
| - if (!this.adapterState.powered)
|
| - this.fire('close-dialog');
|
| + if (!this.adapterState.powered && this.$.dialog.opened)
|
| + this.close();
|
| },
|
|
|
| /**
|
| @@ -108,7 +108,7 @@ settings.BluetoothPairDeviceBehavior = {
|
| pairingChanged_: function(pairingDevice, pairingEvent) {
|
| // Auto-close the dialog when pairing completes.
|
| if (pairingDevice && pairingDevice.connected) {
|
| - this.fire('close-dialog', '');
|
| + this.close();
|
| return;
|
| }
|
| this.pinOrPass = '';
|
| @@ -236,9 +236,6 @@ settings.BluetoothPairDeviceBehavior = {
|
| },
|
|
|
| /** @private */
|
| - onDismissTap_: function() { this.fire('close-dialog', ''); },
|
| -
|
| - /** @private */
|
| sendResponse_: function(response) {
|
| if (!this.pairingDevice)
|
| return;
|
| @@ -386,9 +383,6 @@ Polymer({
|
| if (this.dialogId == 'pairDevice')
|
| this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.CANCEL);
|
| },
|
| -
|
| - /** @private */
|
| - onIronOverlayClosed_: function() { this.fire('close-dialog', ''); },
|
| });
|
|
|
| })();
|
|
|