| OLD | NEW |
| 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 CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // | 90 // |
| 91 // This is used for Bluetooth 2.1 and later devices that support input | 91 // This is used for Bluetooth 2.1 and later devices that support input |
| 92 // but not display, such as keyboards. The Passkey is a numeric in the | 92 // but not display, such as keyboards. The Passkey is a numeric in the |
| 93 // range 0-999999 and should be always presented zero-padded to six | 93 // range 0-999999 and should be always presented zero-padded to six |
| 94 // digits. | 94 // digits. |
| 95 virtual void DisplayPasskey( | 95 virtual void DisplayPasskey( |
| 96 device::BluetoothDevice* device, uint32 passkey) OVERRIDE; | 96 device::BluetoothDevice* device, uint32 passkey) OVERRIDE; |
| 97 | 97 |
| 98 // device::BluetoothDevice::PairingDelegate override. | 98 // device::BluetoothDevice::PairingDelegate override. |
| 99 // | 99 // |
| 100 // This method will be called when the Bluetooth daemon gets a notification |
| 101 // of a key entered on the device |device| while pairing with the device |
| 102 // using a PIN code or a Passkey. |
| 103 // |
| 104 // The UI will show a visual indication that a given key was pressed in the |
| 105 // same pairing overlay where the PIN code or Passkey is displayed. |
| 106 // |
| 107 // A first call with |entered| as 0 will indicate that this notification |
| 108 // mechanism is supported by the device allowing the UI to display this fact. |
| 109 // A last call with |entered| as the length of the key plus one will indicate |
| 110 // that the [enter] key was pressed. |
| 111 virtual void KeysEntered(device::BluetoothDevice* device, |
| 112 uint32 entered) OVERRIDE; |
| 113 |
| 114 // device::BluetoothDevice::PairingDelegate override. |
| 115 // |
| 100 // This method will be called when the Bluetooth daemon requires that the | 116 // This method will be called when the Bluetooth daemon requires that the |
| 101 // user confirm that the Passkey |passkey| is displayed on the screen | 117 // user confirm that the Passkey |passkey| is displayed on the screen |
| 102 // of the device |device| so that it may be authenticated, the UI will | 118 // of the device |device| so that it may be authenticated, the UI will |
| 103 // display the passkey with accompanying instructions. | 119 // display the passkey with accompanying instructions. |
| 104 // | 120 // |
| 105 // This is used for Bluetooth 2.1 and later devices that support display, | 121 // This is used for Bluetooth 2.1 and later devices that support display, |
| 106 // such as other computers or phones. The Passkey is a numeric in the | 122 // such as other computers or phones. The Passkey is a numeric in the |
| 107 // range 0-999999 and should be always present zero-padded to six | 123 // range 0-999999 and should be always present zero-padded to six |
| 108 // digits. | 124 // digits. |
| 109 virtual void ConfirmPasskey( | 125 virtual void ConfirmPasskey( |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 // than this object does. | 217 // than this object does. |
| 202 base::WeakPtrFactory<BluetoothOptionsHandler> weak_ptr_factory_; | 218 base::WeakPtrFactory<BluetoothOptionsHandler> weak_ptr_factory_; |
| 203 | 219 |
| 204 DISALLOW_COPY_AND_ASSIGN(BluetoothOptionsHandler); | 220 DISALLOW_COPY_AND_ASSIGN(BluetoothOptionsHandler); |
| 205 }; | 221 }; |
| 206 | 222 |
| 207 } // namespace options | 223 } // namespace options |
| 208 } // namespace chromeos | 224 } // namespace chromeos |
| 209 | 225 |
| 210 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER_H_ | 226 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER_H_ |
| OLD | NEW |