blob: a79f9ffbed2cc98c2f65dced01367d93b7108d0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
cr.define('options', function() {
/** @const */ var Page = cr.ui.pageManager.Page;
/**
* Encapsulated handling of the BrowserOptions calls from
* BluetoothOptionsHandler that is registered by the webUI,
* ie, BluetoothPairingUI.
* @constructor
*/
function BrowserOptions() {
Page.call(this, 'bluetooth', '', 'bluetooth-container');
}
cr.addSingletonGetter(BrowserOptions);
BrowserOptions.prototype = {
__proto__: Page.prototype,
};
BrowserOptions.showBluetoothSettings = function() {
};
BrowserOptions.setBluetoothState = function() {
};
/**
* Handles addBluetoothDevice call, display the Bluetooth pairing overlay
* for the pairing device.
* @param {{name: string,
* address: string,
* paired: boolean,
* pairing: string | undefined
* pincode: string | undefined
* passkey: number | undefined
* connected: boolean}} device
*/
BrowserOptions.addBluetoothDevice = function(device) {
// One device can be in the process of pairing. If found, display
// the Bluetooth pairing overlay.
if (device.pairing)
BluetoothPairing.showDialog(device);
};
BrowserOptions.removeBluetoothDevice = function(address) {
};
// Export
return {
BrowserOptions: BrowserOptions
};
});
|