Allow only one bookmark to be added for multiple fast starring
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / browser_options.js
bloba79f9ffbed2cc98c2f65dced01367d93b7108d0a
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;
8 /**
9 * Encapsulated handling of the BrowserOptions calls from
10 * BluetoothOptionsHandler that is registered by the webUI,
11 * ie, BluetoothPairingUI.
12 * @constructor
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() {
30 /**
31 * Handles addBluetoothDevice call, display the Bluetooth pairing overlay
32 * for the pairing device.
33 * @param {{name: string,
34 * address: string,
35 * paired: boolean,
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.
44 if (device.pairing)
45 BluetoothPairing.showDialog(device);
48 BrowserOptions.removeBluetoothDevice = function(address) {
51 // Export
52 return {
53 BrowserOptions: BrowserOptions
55 });