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

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: [clang] use POD for constants to avoid exit-time destructor error 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..f1590ac1984e2119a28bfcb10bda15aa7e44055a 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,17 @@ 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']);
+ OptionsPage.closeOverlay();
+ };
+ $('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 +92,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