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

Side by Side Diff: device/bluetooth/bluetooth_device.h

Issue 13870020: Bluetooth: Add support for pairing display notifications (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 2nd round of nits Created 7 years, 8 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
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // may be authenticated. The DismissDisplayOrConfirm() method will be 116 // may be authenticated. The DismissDisplayOrConfirm() method will be
117 // called to dismiss the display once pairing is complete or cancelled. 117 // called to dismiss the display once pairing is complete or cancelled.
118 // 118 //
119 // This is used for Bluetooth 2.1 and later devices that support input 119 // This is used for Bluetooth 2.1 and later devices that support input
120 // but not display, such as keyboards. The Passkey is a numeric in the 120 // but not display, such as keyboards. The Passkey is a numeric in the
121 // range 0-999999 and should be always presented zero-padded to six 121 // range 0-999999 and should be always presented zero-padded to six
122 // digits. 122 // digits.
123 virtual void DisplayPasskey(BluetoothDevice* device, 123 virtual void DisplayPasskey(BluetoothDevice* device,
124 uint32 passkey) = 0; 124 uint32 passkey) = 0;
125 125
126 // This method will be called when the Bluetooth daemon gets a notification
127 // of a key entered on the device |device| while pairing with the device
128 // using a PIN code or a Passkey.
129 //
130 // This method will be called only after DisplayPinCode() or
131 // DisplayPasskey() is called and before the corresponding
132 // DismissDisplayOrConfirm() is called, but is not warranted to be called
133 // on every pairing process that requires a PIN code or a Passkey because
134 // some device may not support this feature.
135 //
136 // The |entered| value describes the number of keys entered so far,
137 // including the last [enter] key. A first call to DisplayEnteredKeys() with
138 // |entered| as 0 will be sent when the device supports this feature.
139 virtual void DisplayEnteredKeys(BluetoothDevice* device,
140 uint32 entered) = 0;
keybuk 2013/04/18 00:56:25 Should this be called something like: KeypressN
deymo 2013/04/18 01:23:14 For the record: Changing this to KeysEntered
141
126 // This method will be called when the Bluetooth daemon requires that the 142 // This method will be called when the Bluetooth daemon requires that the
127 // user confirm that the Passkey |passkey| is displayed on the screen 143 // user confirm that the Passkey |passkey| is displayed on the screen
128 // of the device |device| so that it may be authenticated. The delegate 144 // of the device |device| so that it may be authenticated. The delegate
129 // should display to the user and ask for confirmation, then call 145 // should display to the user and ask for confirmation, then call
130 // ConfirmPairing() on the device to confirm, RejectPairing() on the device 146 // ConfirmPairing() on the device to confirm, RejectPairing() on the device
131 // to reject or CancelPairing() on the device to cancel authentication 147 // to reject or CancelPairing() on the device to cancel authentication
132 // for any other reason. 148 // for any other reason.
133 // 149 //
134 // This is used for Bluetooth 2.1 and later devices that support display, 150 // This is used for Bluetooth 2.1 and later devices that support display,
135 // such as other computers or phones. The Passkey is a numeric in the 151 // such as other computers or phones. The Passkey is a numeric in the
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 338
323 private: 339 private:
324 // Returns a localized string containing the device's bluetooth address and 340 // Returns a localized string containing the device's bluetooth address and
325 // a device type for display when |name_| is empty. 341 // a device type for display when |name_| is empty.
326 string16 GetAddressWithLocalizedDeviceTypeName() const; 342 string16 GetAddressWithLocalizedDeviceTypeName() const;
327 }; 343 };
328 344
329 } // namespace device 345 } // namespace device
330 346
331 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 347 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698