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

Side by Side Diff: chrome/browser/resources/options2/advanced_options.js

Issue 9312001: Add bluetooth callbacks for fetching paired devices and stopping device discovery. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Prune log messages. Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/options2/chromeos/bluetooth_add_device_overlay.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6
7 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 8
9 // 9 //
10 // AdvancedOptions class 10 // AdvancedOptions class
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 */ 422 */
423 AdvancedOptions.setBluetoothState = function(checked) { 423 AdvancedOptions.setBluetoothState = function(checked) {
424 $('enable-bluetooth').checked = checked; 424 $('enable-bluetooth').checked = checked;
425 $('bluetooth-paired-devices-list').parentNode.hidden = !checked; 425 $('bluetooth-paired-devices-list').parentNode.hidden = !checked;
426 $('bluetooth-add-device').hidden = !checked; 426 $('bluetooth-add-device').hidden = !checked;
427 $('bluetooth-reconnect-device').hidden = !checked; 427 $('bluetooth-reconnect-device').hidden = !checked;
428 // Flush list of previously discovered devices if bluetooth is turned off. 428 // Flush list of previously discovered devices if bluetooth is turned off.
429 if (!checked) { 429 if (!checked) {
430 $('bluetooth-paired-devices-list').clear(); 430 $('bluetooth-paired-devices-list').clear();
431 $('bluetooth-unpaired-devices-list').clear(); 431 $('bluetooth-unpaired-devices-list').clear();
432 } else {
433 chrome.send('getPairedBluetoothDevices');
432 } 434 }
433 } 435 }
434 436
435 /** 437 /**
436 * Adds an element to the list of available bluetooth devices. If an element 438 * Adds an element to the list of available bluetooth devices. If an element
437 * with a matching address is found, the existing element is updated. 439 * with a matching address is found, the existing element is updated.
438 * @param {{name: string, 440 * @param {{name: string,
439 * address: string, 441 * address: string,
440 * icon: string, 442 * icon: string,
441 * paired: boolean, 443 * paired: boolean,
(...skipping 17 matching lines...) Expand all
459 if (device.pairing) 461 if (device.pairing)
460 BluetoothPairing.showDialog(device); 462 BluetoothPairing.showDialog(device);
461 }; 463 };
462 464
463 // Export 465 // Export
464 return { 466 return {
465 AdvancedOptions: AdvancedOptions 467 AdvancedOptions: AdvancedOptions
466 }; 468 };
467 469
468 }); 470 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options2/chromeos/bluetooth_add_device_overlay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698