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

Side by Side Diff: extensions/common/api/bluetooth_private.idl

Issue 2727683003: bluetooth: Clean up connection errors (Closed)
Patch Set: merge Created 3 years, 9 months 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 // 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 namespace bluetoothPrivate { 10 namespace bluetoothPrivate {
(...skipping 27 matching lines...) Expand all
38 // to the app to ask for user confirmation. 38 // to the app to ask for user confirmation.
39 requestAuthorization, 39 requestAuthorization,
40 40
41 // Pairing is completed. 41 // Pairing is completed.
42 complete 42 complete
43 }; 43 };
44 44
45 // Results for connect(). See function declaration for details. 45 // Results for connect(). See function declaration for details.
46 enum ConnectResultType { 46 enum ConnectResultType {
47 alreadyConnected, 47 alreadyConnected,
48 attributeLengthInvalid,
49 authCanceled, 48 authCanceled,
50 authFailed, 49 authFailed,
51 authRejected, 50 authRejected,
52 authTimeout, 51 authTimeout,
53 connectionCongested,
54 failed, 52 failed,
55 inProgress, 53 inProgress,
56 insufficientEncryption,
57 offsetInvalid,
58 readNotPermitted,
59 requestNotSupported,
60 success, 54 success,
61 unknownError, 55 unknownError,
62 unsupportedDevice, 56 unsupportedDevice
63 writeNotPermitted
64 }; 57 };
65 58
66 // Valid pairing responses. 59 // Valid pairing responses.
67 enum PairingResponse { 60 enum PairingResponse {
68 confirm, reject, cancel 61 confirm, reject, cancel
69 }; 62 };
70 63
71 enum TransportType { 64 enum TransportType {
72 le, bredr, dual 65 le, bredr, dual
73 }; 66 };
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // Pairs the given device. 151 // Pairs the given device.
159 static void pair(DOMString deviceAddress, optional VoidCallback callback); 152 static void pair(DOMString deviceAddress, optional VoidCallback callback);
160 }; 153 };
161 154
162 interface Events { 155 interface Events {
163 // Fired when a pairing event occurs. 156 // Fired when a pairing event occurs.
164 // |pairingEvent|: A pairing event. 157 // |pairingEvent|: A pairing event.
165 [maxListeners=1] static void onPairing(PairingEvent pairingEvent); 158 [maxListeners=1] static void onPairing(PairingEvent pairingEvent);
166 }; 159 };
167 }; 160 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698