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

Side by Side 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, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file was generated by: 5 // This file was generated by:
6 // ./tools/json_schema_compiler/compiler.py. 6 // ./tools/json_schema_compiler/compiler.py.
7 // NOTE: The format of types has changed. 'FooType' is now 7 // NOTE: The format of types has changed. 'FooType' is now
8 // 'chrome.bluetoothPrivate.FooType'. 8 // 'chrome.bluetoothPrivate.FooType'.
9 // Please run the closure compiler before committing changes. 9 // Please run the closure compiler before committing changes.
10 // See https://code.google.com/p/chromium/wiki/ClosureCompilation. 10 // See https://code.google.com/p/chromium/wiki/ClosureCompilation.
11 11
12 // IMPORTANT: 12 // IMPORTANT:
13 // s/chrome.bluetoothPrivate.bluetooth.device/chrome.bluetooth.device/ 13 // s/chrome.bluetoothPrivate.bluetooth.Device/chrome.bluetooth.Device/
14 14
15 /** @fileoverview Externs generated from namespace: bluetoothPrivate */ 15 /** @fileoverview Externs generated from namespace: bluetoothPrivate */
16 16
17 /** 17 /**
18 * @const 18 * @const
19 */ 19 */
20 chrome.bluetoothPrivate = {}; 20 chrome.bluetoothPrivate = {};
21 21
22 /** 22 /**
23 * @enum {string} 23 * @enum {string}
24 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingEve ntType 24 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingEve ntType
25 */ 25 */
26 chrome.bluetoothPrivate.PairingEventType = { 26 chrome.bluetoothPrivate.PairingEventType = {
27 REQUEST_PINCODE: 'requestPincode', 27 REQUEST_PINCODE: 'requestPincode',
28 DISPLAY_PINCODE: 'displayPincode', 28 DISPLAY_PINCODE: 'displayPincode',
29 REQUEST_PASSKEY: 'requestPasskey', 29 REQUEST_PASSKEY: 'requestPasskey',
30 DISPLAY_PASSKEY: 'displayPasskey', 30 DISPLAY_PASSKEY: 'displayPasskey',
31 KEYS_ENTERED: 'keysEntered', 31 KEYS_ENTERED: 'keysEntered',
32 CONFIRM_PASSKEY: 'confirmPasskey', 32 CONFIRM_PASSKEY: 'confirmPasskey',
33 REQUEST_AUTHORIZATION: 'requestAuthorization', 33 REQUEST_AUTHORIZATION: 'requestAuthorization',
34 COMPLETE: 'complete', 34 COMPLETE: 'complete',
35 }; 35 };
36 36
37 /** 37 /**
38 * @enum {string} 38 * @enum {string}
39 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-ConnectRes ultType
40 */
41 chrome.bluetoothPrivate.ConnectResultType = {
42 SUCCESS: 'success',
43 UNKNOWN_ERROR: 'unknownError',
44 IN_PROGRESS: 'inProgress',
45 FAILED: 'failed',
46 AUTH_FAILED: 'authFailed',
47 AUTH_CANCELED: 'authCanceled',
48 AUTH_REJECTED: 'authRejected',
49 AUTH_TIMEOUT: 'authTimeout',
50 UNSUPPORTED_DEVICE: 'unsupportedDevice',
51 };
52
53 /**
54 * @enum {string}
39 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingRes ponse 55 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingRes ponse
40 */ 56 */
41 chrome.bluetoothPrivate.PairingResponse = { 57 chrome.bluetoothPrivate.PairingResponse = {
42 CONFIRM: 'confirm', 58 CONFIRM: 'confirm',
43 REJECT: 'reject', 59 REJECT: 'reject',
44 CANCEL: 'cancel', 60 CANCEL: 'cancel',
45 }; 61 };
46 62
47 /** 63 /**
64 * @enum {string}
65 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-TransportT ype
66 */
67 chrome.bluetoothPrivate.TransportType = {
68 LE: 'le',
69 BREDR: 'bredr',
70 DUAL: 'dual',
71 };
72
73 /**
48 * @typedef {{ 74 * @typedef {{
49 * pairing: !chrome.bluetoothPrivate.PairingEventType, 75 * pairing: !chrome.bluetoothPrivate.PairingEventType,
50 * device: !chrome.bluetooth.Device, 76 * device: !chrome.bluetooth.Device,
51 * pincode: (string|undefined), 77 * pincode: (string|undefined),
52 * passkey: (number|undefined), 78 * passkey: (number|undefined),
53 * enteredKey: (number|undefined) 79 * enteredKey: (number|undefined)
54 * }} 80 * }}
55 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingEve nt 81 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingEve nt
56 */ 82 */
57 chrome.bluetoothPrivate.PairingEvent; 83 chrome.bluetoothPrivate.PairingEvent;
(...skipping 13 matching lines...) Expand all
71 * device: !chrome.bluetooth.Device, 97 * device: !chrome.bluetooth.Device,
72 * response: (!chrome.bluetoothPrivate.PairingResponse|undefined), 98 * response: (!chrome.bluetoothPrivate.PairingResponse|undefined),
73 * pincode: (string|undefined), 99 * pincode: (string|undefined),
74 * passkey: (number|undefined) 100 * passkey: (number|undefined)
75 * }} 101 * }}
76 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-SetPairing ResponseOptions 102 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-SetPairing ResponseOptions
77 */ 103 */
78 chrome.bluetoothPrivate.SetPairingResponseOptions; 104 chrome.bluetoothPrivate.SetPairingResponseOptions;
79 105
80 /** 106 /**
81 * @enum {string}
82 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-TransportT ype
83 */
84 chrome.bluetoothPrivate.TransportType = {
85 LE: 'le',
86 BREDR: 'bredr',
87 DUAL: 'dual',
88 };
89
90 /**
91 * @typedef {{ 107 * @typedef {{
92 * transport: (!chrome.bluetoothPrivate.TransportType|undefined), 108 * transport: (!chrome.bluetoothPrivate.TransportType|undefined),
93 * uuids: ((string|!Array<string>)|undefined), 109 * uuids: ((string|!Array<string>)|undefined),
94 * rssi: (number|undefined), 110 * rssi: (number|undefined),
95 * pathloss: (number|undefined) 111 * pathloss: (number|undefined)
96 * }} 112 * }}
97 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-DiscoveryF ilter 113 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-DiscoveryF ilter
98 */ 114 */
99 chrome.bluetoothPrivate.DiscoveryFilter; 115 chrome.bluetoothPrivate.DiscoveryFilter;
100 116
(...skipping 22 matching lines...) Expand all
123 139
124 /** 140 /**
125 * Set or clear discovery filter. 141 * Set or clear discovery filter.
126 * @param {!chrome.bluetoothPrivate.DiscoveryFilter} discoveryFilter 142 * @param {!chrome.bluetoothPrivate.DiscoveryFilter} discoveryFilter
127 * @param {function():void=} callback 143 * @param {function():void=} callback
128 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-setDisco veryFilter 144 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-setDisco veryFilter
129 */ 145 */
130 chrome.bluetoothPrivate.setDiscoveryFilter = function(discoveryFilter, callback) {}; 146 chrome.bluetoothPrivate.setDiscoveryFilter = function(discoveryFilter, callback) {};
131 147
132 /** 148 /**
149 * Connects to the given device.
150 * @param {string} deviceAddress
151 * @param {function(!chrome.bluetoothPrivate.ConnectResultType):void=} callback
152 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-connect
153 */
154 chrome.bluetoothPrivate.connect = function(deviceAddress, callback) {};
155
156 /**
133 * Pairs the given device. 157 * Pairs the given device.
134 * @param {string} deviceAddress 158 * @param {string} deviceAddress
135 * @param {function():void=} callback 159 * @param {function():void=} callback
136 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-pair 160 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-pair
137 */ 161 */
138 chrome.bluetoothPrivate.pair = function(deviceAddress, callback) {}; 162 chrome.bluetoothPrivate.pair = function(deviceAddress, callback) {};
139 163
140 /** 164 /**
141 * Fired when a pairing event occurs. 165 * Fired when a pairing event occurs.
142 * @type {!ChromeEvent} 166 * @type {!ChromeEvent}
143 * @see https://developer.chrome.com/extensions/bluetoothPrivate#event-onPairing 167 * @see https://developer.chrome.com/extensions/bluetoothPrivate#event-onPairing
144 */ 168 */
145 chrome.bluetoothPrivate.onPairing; 169 chrome.bluetoothPrivate.onPairing;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698