Index: chrome/browser/resources/options2/browser_options.js |
=================================================================== |
--- chrome/browser/resources/options2/browser_options.js (revision 124492) |
+++ chrome/browser/resources/options2/browser_options.js (working copy) |
@@ -273,10 +273,8 @@ |
options.system.bluetooth.BluetoothDeviceList.decorate( |
$('bluetooth-paired-devices-list')); |
- $('bluetooth-add-device').onclick = function(event) { |
- this.findBluetoothDevices_(true); |
- OptionsPage.navigateToPage('bluetooth'); |
- }; |
+ $('bluetooth-add-device').onclick = |
+ this.handleAddBluetoothDevice_.bind(this); |
$('enable-bluetooth').onchange = function(event) { |
var state = $('enable-bluetooth').checked; |
@@ -481,7 +479,7 @@ |
* @private |
*/ |
hideAdvancedSettings_: function() { |
- $('advanced-settings').style.height = '0px' |
+ $('advanced-settings').style.height = '0px'; |
$('advanced-settings-expander').innerHTML = |
localStrings.getString('showAdvancedSettings'); |
}, |
@@ -955,14 +953,13 @@ |
}, |
/** |
- * Scan for bluetooth devices. |
- * @param {boolean} reset Indicates if the list of unpaired devices should |
- * be cleared. |
+ * Handle the 'add device' button click. |
* @private |
*/ |
- findBluetoothDevices_: function(reset) { |
+ handleAddBluetoothDevice_: function() { |
$('bluetooth-unpaired-devices-list').clear(); |
chrome.send('findBluetoothDevices'); |
+ OptionsPage.navigateToPage('bluetooth'); |
}, |
/** |