OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // <code>chrome.easyUnlockPrivate</code> API that provides hooks to Chrome to | 5 // <code>chrome.easyUnlockPrivate</code> API that provides hooks to Chrome to |
6 // be used by Easy Unlock component app. | 6 // be used by Easy Unlock component app. |
7 [nodoc] namespace easyUnlockPrivate { | 7 [nodoc] namespace easyUnlockPrivate { |
8 // Signature algorithms supported by the crypto library methods used by | 8 // Signature algorithms supported by the crypto library methods used by |
9 // Easy Unlock. | 9 // Easy Unlock. |
10 enum SignatureType { | 10 enum SignatureType { |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 // Bluetooth address. This function is useful as a faster alternative to | 210 // Bluetooth address. This function is useful as a faster alternative to |
211 // Bluetooth discovery, when you already know the remote device's Bluetooth | 211 // Bluetooth discovery, when you already know the remote device's Bluetooth |
212 // address. A successful call to this function has the side-effect of | 212 // address. A successful call to this function has the side-effect of |
213 // registering the device with the Bluetooth daemon, making it available for | 213 // registering the device with the Bluetooth daemon, making it available for |
214 // future outgoing connections. | 214 // future outgoing connections. |
215 // |deviceAddress|: The Bluetooth address of the device to connect to. | 215 // |deviceAddress|: The Bluetooth address of the device to connect to. |
216 // |callback|: Called to indicate success or failure. | 216 // |callback|: Called to indicate success or failure. |
217 static void seekBluetoothDeviceByAddress(DOMString deviceAddress, | 217 static void seekBluetoothDeviceByAddress(DOMString deviceAddress, |
218 optional EmptyCallback callback); | 218 optional EmptyCallback callback); |
219 | 219 |
| 220 // Connects the socket to a remote Bluetooth device over an insecure |
| 221 // connection, i.e. a connection that requests no bonding and no |
| 222 // man-in-the-middle protection. Other than the reduced security setting, |
| 223 // behaves identically to the chrome.bluetoothSocket.connect() function. |
| 224 // |socketId|: The socket identifier, as issued by the |
| 225 // chrome.bluetoothSocket API. |
| 226 // |deviceAddress|: The Bluetooth address of the device to connect to. |
| 227 // |uuid|: The UUID of the service to connect to. |
| 228 // |callback|: Called when the connect attempt is complete. |
| 229 static void connectToBluetoothServiceInsecurely(long socketId, |
| 230 DOMString deviceAddress, |
| 231 DOMString uuid, |
| 232 EmptyCallback callback); |
| 233 |
220 // Updates the screenlock state to reflect the Easy Unlock app state. | 234 // Updates the screenlock state to reflect the Easy Unlock app state. |
221 static void updateScreenlockState(State state, | 235 static void updateScreenlockState(State state, |
222 optional EmptyCallback callback); | 236 optional EmptyCallback callback); |
223 | 237 |
224 // Saves the permit record for the local device. | 238 // Saves the permit record for the local device. |
225 // |permitAccess|: The permit record to be saved. | 239 // |permitAccess|: The permit record to be saved. |
226 // |callback|: Called to indicate success or failure. | 240 // |callback|: Called to indicate success or failure. |
227 static void setPermitAccess(PermitRecord permitAccess, | 241 static void setPermitAccess(PermitRecord permitAccess, |
228 optional EmptyCallback callback); | 242 optional EmptyCallback callback); |
229 | 243 |
230 // Gets the permit record for the local device. | 244 // Gets the permit record for the local device. |
231 static void getPermitAccess(GetPermitAccessCallback callback); | 245 static void getPermitAccess(GetPermitAccessCallback callback); |
232 | 246 |
233 // Clears the permit record for the local device. | 247 // Clears the permit record for the local device. |
234 static void clearPermitAccess(optional EmptyCallback callback); | 248 static void clearPermitAccess(optional EmptyCallback callback); |
235 | 249 |
236 // Saves the remote device list. | 250 // Saves the remote device list. |
237 // |devices|: The list of remote devices to be saved. | 251 // |devices|: The list of remote devices to be saved. |
238 // |callback|: Called to indicate success or failure. | 252 // |callback|: Called to indicate success or failure. |
239 static void setRemoteDevices(Device[] devices, | 253 static void setRemoteDevices(Device[] devices, |
240 optional EmptyCallback callback); | 254 optional EmptyCallback callback); |
241 | 255 |
242 // Gets the remote device list. | 256 // Gets the remote device list. |
243 static void getRemoteDevices(GetRemoteDevicesCallback callback); | 257 static void getRemoteDevices(GetRemoteDevicesCallback callback); |
244 }; | 258 }; |
245 }; | 259 }; |
OLD | NEW |