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

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: Rebase 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
« no previous file with comments | « extensions/common/api/bluetooth_private.idl ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ALREADY_CONNECTED: 'alreadyConnected',
46 FAILED: 'failed',
47 AUTH_FAILED: 'authFailed',
48 AUTH_CANCELED: 'authCanceled',
49 AUTH_REJECTED: 'authRejected',
50 AUTH_TIMEOUT: 'authTimeout',
51 UNSUPPORTED_DEVICE: 'unsupportedDevice',
52 };
53
54 /**
55 * @enum {string}
39 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingRes ponse 56 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingRes ponse
40 */ 57 */
41 chrome.bluetoothPrivate.PairingResponse = { 58 chrome.bluetoothPrivate.PairingResponse = {
42 CONFIRM: 'confirm', 59 CONFIRM: 'confirm',
43 REJECT: 'reject', 60 REJECT: 'reject',
44 CANCEL: 'cancel', 61 CANCEL: 'cancel',
45 }; 62 };
46 63
47 /** 64 /**
65 * @enum {string}
66 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-TransportT ype
67 */
68 chrome.bluetoothPrivate.TransportType = {
69 LE: 'le',
70 BREDR: 'bredr',
71 DUAL: 'dual',
72 };
73
74 /**
48 * @typedef {{ 75 * @typedef {{
49 * pairing: !chrome.bluetoothPrivate.PairingEventType, 76 * pairing: !chrome.bluetoothPrivate.PairingEventType,
50 * device: !chrome.bluetooth.Device, 77 * device: !chrome.bluetooth.Device,
51 * pincode: (string|undefined), 78 * pincode: (string|undefined),
52 * passkey: (number|undefined), 79 * passkey: (number|undefined),
53 * enteredKey: (number|undefined) 80 * enteredKey: (number|undefined)
54 * }} 81 * }}
55 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingEve nt 82 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingEve nt
56 */ 83 */
57 chrome.bluetoothPrivate.PairingEvent; 84 chrome.bluetoothPrivate.PairingEvent;
(...skipping 13 matching lines...) Expand all
71 * device: !chrome.bluetooth.Device, 98 * device: !chrome.bluetooth.Device,
72 * response: (!chrome.bluetoothPrivate.PairingResponse|undefined), 99 * response: (!chrome.bluetoothPrivate.PairingResponse|undefined),
73 * pincode: (string|undefined), 100 * pincode: (string|undefined),
74 * passkey: (number|undefined) 101 * passkey: (number|undefined)
75 * }} 102 * }}
76 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-SetPairing ResponseOptions 103 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-SetPairing ResponseOptions
77 */ 104 */
78 chrome.bluetoothPrivate.SetPairingResponseOptions; 105 chrome.bluetoothPrivate.SetPairingResponseOptions;
79 106
80 /** 107 /**
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 {{ 108 * @typedef {{
92 * transport: (!chrome.bluetoothPrivate.TransportType|undefined), 109 * transport: (!chrome.bluetoothPrivate.TransportType|undefined),
93 * uuids: ((string|!Array<string>)|undefined), 110 * uuids: ((string|!Array<string>)|undefined),
94 * rssi: (number|undefined), 111 * rssi: (number|undefined),
95 * pathloss: (number|undefined) 112 * pathloss: (number|undefined)
96 * }} 113 * }}
97 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-DiscoveryF ilter 114 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-DiscoveryF ilter
98 */ 115 */
99 chrome.bluetoothPrivate.DiscoveryFilter; 116 chrome.bluetoothPrivate.DiscoveryFilter;
100 117
(...skipping 22 matching lines...) Expand all
123 140
124 /** 141 /**
125 * Set or clear discovery filter. 142 * Set or clear discovery filter.
126 * @param {!chrome.bluetoothPrivate.DiscoveryFilter} discoveryFilter 143 * @param {!chrome.bluetoothPrivate.DiscoveryFilter} discoveryFilter
127 * @param {function():void=} callback 144 * @param {function():void=} callback
128 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-setDisco veryFilter 145 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-setDisco veryFilter
129 */ 146 */
130 chrome.bluetoothPrivate.setDiscoveryFilter = function(discoveryFilter, callback) {}; 147 chrome.bluetoothPrivate.setDiscoveryFilter = function(discoveryFilter, callback) {};
131 148
132 /** 149 /**
150 * Connects to the given device. This will only throw an error if the device
151 * address is invalid or the device is already connected. Otherwise this will
152 * succeed and invoke |callback| with ConnectResultType.
153 * @param {string} deviceAddress
154 * @param {function(!chrome.bluetoothPrivate.ConnectResultType):void=} callback
155 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-connect
156 */
157 chrome.bluetoothPrivate.connect = function(deviceAddress, callback) {};
158
159 /**
133 * Pairs the given device. 160 * Pairs the given device.
134 * @param {string} deviceAddress 161 * @param {string} deviceAddress
135 * @param {function():void=} callback 162 * @param {function():void=} callback
136 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-pair 163 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-pair
137 */ 164 */
138 chrome.bluetoothPrivate.pair = function(deviceAddress, callback) {}; 165 chrome.bluetoothPrivate.pair = function(deviceAddress, callback) {};
139 166
140 /** 167 /**
141 * Fired when a pairing event occurs. 168 * Fired when a pairing event occurs.
142 * @type {!ChromeEvent} 169 * @type {!ChromeEvent}
143 * @see https://developer.chrome.com/extensions/bluetoothPrivate#event-onPairing 170 * @see https://developer.chrome.com/extensions/bluetoothPrivate#event-onPairing
144 */ 171 */
145 chrome.bluetoothPrivate.onPairing; 172 chrome.bluetoothPrivate.onPairing;
OLDNEW
« no previous file with comments | « extensions/common/api/bluetooth_private.idl ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698