Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // Use the <code>chrome.bluetoothPrivate</code> API to control the Bluetooth | 5 // Use the <code>chrome.bluetoothPrivate</code> API to control the Bluetooth |
| 6 // adapter state and handle device pairing. | 6 // adapter state and handle device pairing. |
| 7 // NOTE: This IDL is dependent on bluetooth.idl. | 7 // NOTE: This IDL is dependent on bluetooth.idl. |
| 8 | 8 |
| 9 [implemented_in = "extensions/browser/api/bluetooth/bluetooth_private_api.h"] | 9 [implemented_in = "extensions/browser/api/bluetooth/bluetooth_private_api.h"] |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 // Requests authorization for a pairing under the just-works model. It is up | 38 // Requests authorization for a pairing under the just-works model. It is up |
| 39 // to the app to ask for user confirmation. | 39 // to the app to ask for user confirmation. |
| 40 requestAuthorization, | 40 requestAuthorization, |
| 41 | 41 |
| 42 // Pairing is completed. | 42 // Pairing is completed. |
| 43 complete | 43 complete |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 // Results for connect(). See function declaration for details. | 46 // Results for connect(). See function declaration for details. |
| 47 enum ConnectResultType { | 47 enum ConnectResultType { |
| 48 success, | 48 success, |
|
scheib
2015/11/26 00:02:51
Please sort alphabetically.
Kai Jiang
2015/11/29 10:40:52
Done.
| |
| 49 unknownError, | 49 unknownError, |
| 50 inProgress, | 50 inProgress, |
| 51 alreadyConnected, | 51 alreadyConnected, |
| 52 failed, | 52 failed, |
| 53 authFailed, | 53 authFailed, |
| 54 authCanceled, | 54 authCanceled, |
| 55 authRejected, | 55 authRejected, |
| 56 authTimeout, | 56 authTimeout, |
| 57 unsupportedDevice | 57 unsupportedDevice, |
| 58 attributeLengthInvalid, | |
| 59 connectionCongested, | |
| 60 insufficientEncryption, | |
| 61 offsetInvalid, | |
| 62 readFailed, | |
|
scheib
2015/11/26 00:02:51
readNotPermitted
Kai Jiang
2015/11/29 10:40:52
Done.
| |
| 63 requestNotSupported, | |
| 64 writeFailed | |
|
scheib
2015/11/26 00:02:51
writeNotPermitted
Kai Jiang
2015/11/29 10:40:52
Done.
| |
| 58 }; | 65 }; |
| 59 | 66 |
| 60 // Valid pairing responses. | 67 // Valid pairing responses. |
| 61 enum PairingResponse { | 68 enum PairingResponse { |
| 62 confirm, reject, cancel | 69 confirm, reject, cancel |
| 63 }; | 70 }; |
| 64 | 71 |
| 65 enum TransportType { | 72 enum TransportType { |
| 66 le, bredr, dual | 73 le, bredr, dual |
| 67 }; | 74 }; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 // Pairs the given device. | 159 // Pairs the given device. |
| 153 static void pair(DOMString deviceAddress, optional VoidCallback callback); | 160 static void pair(DOMString deviceAddress, optional VoidCallback callback); |
| 154 }; | 161 }; |
| 155 | 162 |
| 156 interface Events { | 163 interface Events { |
| 157 // Fired when a pairing event occurs. | 164 // Fired when a pairing event occurs. |
| 158 // |pairingEvent|: A pairing event. | 165 // |pairingEvent|: A pairing event. |
| 159 [maxListeners=1] static void onPairing(PairingEvent pairingEvent); | 166 [maxListeners=1] static void onPairing(PairingEvent pairingEvent); |
| 160 }; | 167 }; |
| 161 }; | 168 }; |
| OLD | NEW |