OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 cr.define('options', function() { | 5 cr.define('options', function() { |
6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
8 var RepeatingButton = cr.ui.RepeatingButton; | 8 var RepeatingButton = cr.ui.RepeatingButton; |
9 | 9 |
10 // | 10 // |
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1342 chrome.send('getPairedBluetoothDevices'); | 1342 chrome.send('getPairedBluetoothDevices'); |
1343 } | 1343 } |
1344 }, | 1344 }, |
1345 | 1345 |
1346 /** | 1346 /** |
1347 * Adds an element to the list of available Bluetooth devices. If an element | 1347 * Adds an element to the list of available Bluetooth devices. If an element |
1348 * with a matching address is found, the existing element is updated. | 1348 * with a matching address is found, the existing element is updated. |
1349 * @param {{name: string, | 1349 * @param {{name: string, |
1350 * address: string, | 1350 * address: string, |
1351 * paired: boolean, | 1351 * paired: boolean, |
1352 * bonded: boolean, | |
1353 * connected: boolean}} device | 1352 * connected: boolean}} device |
1354 * Decription of the Bluetooth device. | 1353 * Decription of the Bluetooth device. |
1355 * @private | 1354 * @private |
1356 */ | 1355 */ |
1357 addBluetoothDevice_: function(device) { | 1356 addBluetoothDevice_: function(device) { |
1358 var list = $('bluetooth-unpaired-devices-list'); | 1357 var list = $('bluetooth-unpaired-devices-list'); |
1359 if (device.paired) { | 1358 if (device.paired) { |
1360 // Test to see if the device is currently in the unpaired list, in which | 1359 // Test to see if the device is currently in the unpaired list, in which |
1361 // case it should be removed from that list. | 1360 // case it should be removed from that list. |
1362 var index = $('bluetooth-unpaired-devices-list').find(device.address); | 1361 var index = $('bluetooth-unpaired-devices-list').find(device.address); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 BrowserOptions.getLoggedInUsername = function() { | 1446 BrowserOptions.getLoggedInUsername = function() { |
1448 return BrowserOptions.getInstance().username_; | 1447 return BrowserOptions.getInstance().username_; |
1449 }; | 1448 }; |
1450 } | 1449 } |
1451 | 1450 |
1452 // Export | 1451 // Export |
1453 return { | 1452 return { |
1454 BrowserOptions: BrowserOptions | 1453 BrowserOptions: BrowserOptions |
1455 }; | 1454 }; |
1456 }); | 1455 }); |
OLD | NEW |