1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 cr.define('options', function() {
6 /** @const */ var Page = cr.ui.pageManager.Page;
9 * Encapsulated handling of the BrowserOptions calls from
10 * BluetoothOptionsHandler that is registered by the webUI,
11 * ie, BluetoothPairingUI.
14 function BrowserOptions() {
15 Page.call(this, 'bluetooth', '', 'bluetooth-container');
18 cr.addSingletonGetter(BrowserOptions);
20 BrowserOptions.prototype = {
21 __proto__: Page.prototype,
24 BrowserOptions.showBluetoothSettings = function() {
27 BrowserOptions.setBluetoothState = function() {
31 * Handles addBluetoothDevice call, display the Bluetooth pairing overlay
32 * for the pairing device.
33 * @param {{name: string,
36 * pairing: string | undefined
37 * pincode: string | undefined
38 * passkey: number | undefined
39 * connected: boolean}} device
41 BrowserOptions.addBluetoothDevice = function(device) {
42 // One device can be in the process of pairing. If found, display
43 // the Bluetooth pairing overlay.
45 BluetoothPairing.showDialog(device);
48 BrowserOptions.removeBluetoothDevice = function(address) {
53 BrowserOptions: BrowserOptions