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

Unified Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js

Issue 2161753002: MD Settings: Bluetooth dialog, remove unnecessary 'close-dialog' event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 4 years, 5 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: 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', ''); },
});
})();

Powered by Google App Engine
This is Rietveld 408576698