Commit 1367a8cc authored by David Tseng's avatar David Tseng Committed by Commit Bot

Remove duplicate bluetooth_private externs from chrome_extensions.js

Change-Id: I7ac749bfa0115479b133e9e9f53390b9ebf4022a
Reviewed-on: https://chromium-review.googlesource.com/c/1435114Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626318}
parent faa5e4ba
......@@ -176,7 +176,12 @@ BluetoothBrailleDisplayManager.prototype = {
*/
finishPairing: function(display, pincode) {
chrome.bluetoothPrivate.setPairingResponse(
{response: 'confirm', device: display, pincode: pincode}, () => {});
{
response: chrome.bluetoothPrivate.PairingResponse.CONFIRM,
device: display,
pincode: pincode
},
() => {});
},
/**
......
......@@ -54,6 +54,10 @@ _AUDIO_EXTERNS = (
_AUTOMATION_EXTERNS = (
ChromeRootPath('third_party/closure_compiler/externs/automation.js'))
# BluetoothPrivate externs file.
_BLUETOOTH_PRIVATE_EXTERNS = (
ChromeRootPath('third_party/closure_compiler/externs/bluetooth_private.js'))
# MetricsPrivate externs file.
_METRICS_PRIVATE_EXTERNS = (
ChromeRootPath('third_party/closure_compiler/externs/metrics_private.js'))
......@@ -85,6 +89,7 @@ _COMMON_EXTERNS = [
_ACCESSIBILITY_PRIVATE_EXTERNS,
_AUDIO_EXTERNS,
_AUTOMATION_EXTERNS,
_BLUETOOTH_PRIVATE_EXTERNS,
_CHROME_EXTERNS,
_CHROME_EXTENSIONS_EXTERNS,
_COMMANDLINE_PRIVATE_EXTERNS,
......
......@@ -10341,193 +10341,6 @@ chrome.gcdPrivate.onDeviceStateChanged;
chrome.gcdPrivate.onDeviceRemoved;
/**
* @const
* @see https://cs.chromium.org/chromium/src/extensions/common/api/bluetooth_private.idl
*/
chrome.bluetoothPrivate = {};
/** @constructor */
chrome.bluetoothPrivate.PairingEvent = function() {};
/** @type {string} */
chrome.bluetoothPrivate.PairingEvent.prototype.pairing;
/** @type {!chrome.bluetooth.Device} */
chrome.bluetoothPrivate.PairingEvent.prototype.device;
/** @type {string|undefined} */
chrome.bluetoothPrivate.PairingEvent.prototype.pincode;
/** @type {number|undefined} */
chrome.bluetoothPrivate.PairingEvent.prototype.passkey;
/** @type {number|undefined} */
chrome.bluetoothPrivate.PairingEvent.prototype.enteredKey;
/**
* @typedef {{
* name: (string|undefined),
* powered: (boolean|undefined),
* discoverable: (boolean|undefined)
* }}
*/
chrome.bluetoothPrivate.NewAdapterState;
/**
* @typedef {{
* device: !chrome.bluetooth.Device,
* response: (string|undefined),
* pincode: (string|undefined),
* passkey: (number|undefined),
* enteredKey: (number|undefined)
* }}
*/
chrome.bluetoothPrivate.SetPairingResponseOptions;
/**
* @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState
* @param {function()} callback
* @return {undefined}
*/
chrome.bluetoothPrivate.setAdapterState = function(adapterState, callback) {};
/**
* @param {!chrome.bluetoothPrivate.SetPairingResponseOptions} options
* @param {function()} callback
* @return {undefined}
*/
chrome.bluetoothPrivate.setPairingResponse = function(options, callback) {};
/**
* @param {string} deviceAddress
* @param {function():void=} callback
*/
chrome.bluetoothPrivate.disconnectAll = function(deviceAddress, callback) {};
/**
* @param {string} deviceAddress
* @param {function():void=} callback
* @return {undefined}
*/
chrome.bluetoothPrivate.forgetDevice = function(deviceAddress, callback) {};
/**
* @typedef {{
* transport: (!chrome.bluetoothPrivate.TransportType|undefined),
* uuids: ((string|!Array<string>)|undefined),
* rssi: (number|undefined),
* pathloss: (number|undefined)
* }}
*/
chrome.bluetoothPrivate.DiscoveryFilter;
/**
* Set or clear discovery filter.
* @param {!chrome.bluetoothPrivate.DiscoveryFilter} discoveryFilter
* @param {function():void=} callback
*/
chrome.bluetoothPrivate.setDiscoveryFilter = function(
discoveryFilter, callback) {};
/**
* Event whose listeners take a PairingEvent parameter.
* @interface
* @extends {ChromeBaseEvent<function(!chrome.bluetoothPrivate.PairingEvent)>}
*/
chrome.bluetoothPrivate.PairingEventEvent = function() {};
/** @type {!chrome.bluetoothPrivate.PairingEventEvent} */
chrome.bluetoothPrivate.onPairing;
/**
* @param {string} deviceAddress
* @param {function(number, string): void=} opt_callback
*/
chrome.bluetoothPrivate.pair = function(deviceAddress, opt_callback) {};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingResponse
*/
chrome.bluetoothPrivate.PairingResponse = {
CONFIRM: '',
REJECT: '',
CANCEL: '',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingEventType
*/
chrome.bluetoothPrivate.PairingEventType = {
REQUEST_PINCODE: '',
DISPLAY_PINCODE: '',
REQUEST_PASSKEY: '',
DISPLAY_PASSKEY: '',
KEYS_ENTERED: '',
CONFIRM_PASSKEY: '',
REQUEST_AUTHORIZATION: '',
COMPLETE: '',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/bluetoothPrivate#type-ConnectResultType
*/
chrome.bluetoothPrivate.ConnectResultType = {
ALREADY_CONNECTED: '',
ATTRIBUTE_LENGTH_INVALID: '',
AUTH_CANCELED: '',
AUTH_FAILED: '',
AUTH_REJECTED: '',
AUTH_TIMEOUT: '',
CONNECTION_CONGESTED: '',
FAILED: '',
IN_PROGRESS: '',
INSUFFICIENT_ENCRYPTION: '',
OFFSET_INVALID: '',
READ_NOT_PERMITTED: '',
REQUEST_NOT_SUPPORTED: '',
SUCCESS: '',
UNKNOWN_ERROR: '',
UNSUPPORTED_DEVICE: '',
WRITE_NOT_PERMITTED: '',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/bluetoothPrivate#type-TransportType
*/
chrome.bluetoothPrivate.TransportType = {
LE: '',
BREDR: '',
DUAL: '',
};
/**
* @const
* @see http://goo.gl/XmVdHm
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment