Index: chrome/browser/resources/options2/chromeos/bluetooth_pair_device_overlay.js |
diff --git a/chrome/browser/resources/options2/chromeos/bluetooth_pair_device_overlay.js b/chrome/browser/resources/options2/chromeos/bluetooth_pair_device_overlay.js |
index ca455d184ad1f9bf61621b0da12e84500ea7502b..3b3c423bf69ca2bdd6dd4ee5cda7f2203d50cdcf 100644 |
--- a/chrome/browser/resources/options2/chromeos/bluetooth_pair_device_overlay.js |
+++ b/chrome/browser/resources/options2/chromeos/bluetooth_pair_device_overlay.js |
@@ -72,12 +72,16 @@ cr.define('options', function() { |
initializePage: function() { |
OptionsPage.prototype.initializePage.call(this); |
var self = this; |
- var cancel = function() { |
+ $('bluetooth-pair-device-cancel-button').onclick = function() { |
chrome.send('updateBluetoothDevice', |
[self.device_.address, 'cancel']); |
OptionsPage.closeOverlay(); |
}; |
- var connect = function() { |
+ $('bluetooth-pair-device-reject-button').onclick = function() { |
+ chrome.send('updateBluetoothDevice', |
+ [self.device_.address, 'reject']); |
+ }; |
kevers
2012/03/13 22:57:20
missing closeOverlay on the reject click?
keybuk
2012/03/13 22:59:43
Done.
|
+ $('bluetooth-pair-device-connect-button').onclick = function() { |
var args = [self.device_.address, 'connect']; |
var passkey = self.device_.passkey; |
if (!passkey && !$('bluetooth-pairing-passkey-entry').hidden) |
@@ -87,10 +91,11 @@ cr.define('options', function() { |
chrome.send('updateBluetoothDevice', args); |
OptionsPage.closeOverlay(); |
}; |
- $('bluetooth-pair-device-cancel-button').onclick = cancel; |
- $('bluetooth-pair-device-reject-button').onclick = cancel; |
- $('bluetooth-pair-device-connect-button').onclick = connect; |
- $('bluetooth-pair-device-accept-button').onclick = connect; |
+ $('bluetooth-pair-device-accept-button').onclick = function() { |
+ chrome.send('updateBluetoothDevice', |
+ [self.device_.address, 'accept']); |
+ OptionsPage.closeOverlay(); |
+ }; |
$('bluetooth-pair-device-dismiss-button').onclick = function() { |
OptionsPage.closeOverlay(); |
}; |