Commit 904e1792 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Revert "Remove duplicate bluetooth_private externs from chrome_extensions.js"

This reverts commit 1367a8cc.

Reason for revert: <INSERT REASONING HERE>
Rolled back upstream.

Original change's description:
> Remove duplicate bluetooth_private externs from chrome_extensions.js
> 
> Change-Id: I7ac749bfa0115479b133e9e9f53390b9ebf4022a
> Reviewed-on: https://chromium-review.googlesource.com/c/1435114
> Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
> Commit-Queue: David Tseng <dtseng@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#626318}

TBR=dtseng@chromium.org,rdevlin.cronin@chromium.org,devlin@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I7463eb309c1c63926743c51189abe2df9f10f361
Reviewed-on: https://chromium-review.googlesource.com/c/1440511Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626789}
parent 756eefe2
...@@ -176,12 +176,7 @@ BluetoothBrailleDisplayManager.prototype = { ...@@ -176,12 +176,7 @@ BluetoothBrailleDisplayManager.prototype = {
*/ */
finishPairing: function(display, pincode) { finishPairing: function(display, pincode) {
chrome.bluetoothPrivate.setPairingResponse( chrome.bluetoothPrivate.setPairingResponse(
{ {response: 'confirm', device: display, pincode: pincode}, () => {});
response: chrome.bluetoothPrivate.PairingResponse.CONFIRM,
device: display,
pincode: pincode
},
() => {});
}, },
/** /**
......
...@@ -54,10 +54,6 @@ _AUDIO_EXTERNS = ( ...@@ -54,10 +54,6 @@ _AUDIO_EXTERNS = (
_AUTOMATION_EXTERNS = ( _AUTOMATION_EXTERNS = (
ChromeRootPath('third_party/closure_compiler/externs/automation.js')) 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. # MetricsPrivate externs file.
_METRICS_PRIVATE_EXTERNS = ( _METRICS_PRIVATE_EXTERNS = (
ChromeRootPath('third_party/closure_compiler/externs/metrics_private.js')) ChromeRootPath('third_party/closure_compiler/externs/metrics_private.js'))
...@@ -89,7 +85,6 @@ _COMMON_EXTERNS = [ ...@@ -89,7 +85,6 @@ _COMMON_EXTERNS = [
_ACCESSIBILITY_PRIVATE_EXTERNS, _ACCESSIBILITY_PRIVATE_EXTERNS,
_AUDIO_EXTERNS, _AUDIO_EXTERNS,
_AUTOMATION_EXTERNS, _AUTOMATION_EXTERNS,
_BLUETOOTH_PRIVATE_EXTERNS,
_CHROME_EXTERNS, _CHROME_EXTERNS,
_CHROME_EXTENSIONS_EXTERNS, _CHROME_EXTENSIONS_EXTERNS,
_COMMANDLINE_PRIVATE_EXTERNS, _COMMANDLINE_PRIVATE_EXTERNS,
......
...@@ -10341,6 +10341,193 @@ chrome.gcdPrivate.onDeviceStateChanged; ...@@ -10341,6 +10341,193 @@ chrome.gcdPrivate.onDeviceStateChanged;
chrome.gcdPrivate.onDeviceRemoved; 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 * @const
* @see http://goo.gl/XmVdHm * @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