Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1679)

Unified Diff: third_party/closure_compiler/externs/bluetooth_private.js

Issue 1419023004: Add bluetoothPrivate.connect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_543294_bluetooth_options_2b_props
Patch Set: Fix connect response + feedback Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/closure_compiler/externs/bluetooth_private.js
diff --git a/third_party/closure_compiler/externs/bluetooth_private.js b/third_party/closure_compiler/externs/bluetooth_private.js
index 68fbabe91468febd4ffa6171e00a1bc28c9049b8..020ef6c6aa3a8bfa79fbf00b2dd3ca10f32d4c0f 100644
--- a/third_party/closure_compiler/externs/bluetooth_private.js
+++ b/third_party/closure_compiler/externs/bluetooth_private.js
@@ -10,7 +10,7 @@
// See https://code.google.com/p/chromium/wiki/ClosureCompilation.
// IMPORTANT:
-// s/chrome.bluetoothPrivate.bluetooth.device/chrome.bluetooth.device/
+// s/chrome.bluetoothPrivate.bluetooth.Device/chrome.bluetooth.Device/
/** @fileoverview Externs generated from namespace: bluetoothPrivate */
@@ -36,6 +36,22 @@ chrome.bluetoothPrivate.PairingEventType = {
/**
* @enum {string}
+ * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-ConnectResultType
+ */
+chrome.bluetoothPrivate.ConnectResultType = {
+ SUCCESS: 'success',
+ UNKNOWN_ERROR: 'unknownError',
+ IN_PROGRESS: 'inProgress',
+ FAILED: 'failed',
+ AUTH_FAILED: 'authFailed',
+ AUTH_CANCELED: 'authCanceled',
+ AUTH_REJECTED: 'authRejected',
+ AUTH_TIMEOUT: 'authTimeout',
+ UNSUPPORTED_DEVICE: 'unsupportedDevice',
+};
+
+/**
+ * @enum {string}
* @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingResponse
*/
chrome.bluetoothPrivate.PairingResponse = {
@@ -45,6 +61,16 @@ chrome.bluetoothPrivate.PairingResponse = {
};
/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-TransportType
+ */
+chrome.bluetoothPrivate.TransportType = {
+ LE: 'le',
+ BREDR: 'bredr',
+ DUAL: 'dual',
+};
+
+/**
* @typedef {{
* pairing: !chrome.bluetoothPrivate.PairingEventType,
* device: !chrome.bluetooth.Device,
@@ -78,16 +104,6 @@ chrome.bluetoothPrivate.NewAdapterState;
chrome.bluetoothPrivate.SetPairingResponseOptions;
/**
- * @enum {string}
- * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-TransportType
- */
-chrome.bluetoothPrivate.TransportType = {
- LE: 'le',
- BREDR: 'bredr',
- DUAL: 'dual',
-};
-
-/**
* @typedef {{
* transport: (!chrome.bluetoothPrivate.TransportType|undefined),
* uuids: ((string|!Array<string>)|undefined),
@@ -130,6 +146,14 @@ chrome.bluetoothPrivate.disconnectAll = function(deviceAddress, callback) {};
chrome.bluetoothPrivate.setDiscoveryFilter = function(discoveryFilter, callback) {};
/**
+ * Connects to the given device.
+ * @param {string} deviceAddress
+ * @param {function(!chrome.bluetoothPrivate.ConnectResultType):void=} callback
+ * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-connect
+ */
+chrome.bluetoothPrivate.connect = function(deviceAddress, callback) {};
+
+/**
* Pairs the given device.
* @param {string} deviceAddress
* @param {function():void=} callback

Powered by Google App Engine
This is Rietveld 408576698