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

Unified Diff: chrome/browser/resources/options2/chromeos/bluetooth_pair_device_overlay.js

Issue 9694054: bluetooth: implement device pairing support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/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();
};

Powered by Google App Engine
This is Rietveld 408576698