| 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 use_movable_types=true] | |
| 11 | |
| 12 namespace bluetoothPrivate { | 10 namespace bluetoothPrivate { |
| 13 // Events that can occur during pairing. The method used for pairing varies | 11 // Events that can occur during pairing. The method used for pairing varies |
| 14 // depending on the capability of the two devices. | 12 // depending on the capability of the two devices. |
| 15 enum PairingEventType { | 13 enum PairingEventType { |
| 16 // An alphanumeric PIN code is required to be entered by the user. | 14 // An alphanumeric PIN code is required to be entered by the user. |
| 17 requestPincode, | 15 requestPincode, |
| 18 | 16 |
| 19 // Display a PIN code to the user. | 17 // Display a PIN code to the user. |
| 20 displayPincode, | 18 displayPincode, |
| 21 | 19 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // Pairs the given device. | 158 // Pairs the given device. |
| 161 static void pair(DOMString deviceAddress, optional VoidCallback callback); | 159 static void pair(DOMString deviceAddress, optional VoidCallback callback); |
| 162 }; | 160 }; |
| 163 | 161 |
| 164 interface Events { | 162 interface Events { |
| 165 // Fired when a pairing event occurs. | 163 // Fired when a pairing event occurs. |
| 166 // |pairingEvent|: A pairing event. | 164 // |pairingEvent|: A pairing event. |
| 167 [maxListeners=1] static void onPairing(PairingEvent pairingEvent); | 165 [maxListeners=1] static void onPairing(PairingEvent pairingEvent); |
| 168 }; | 166 }; |
| 169 }; | 167 }; |
| OLD | NEW |