diff options
author | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-23 01:53:18 +0000 |
---|---|---|
committer | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-23 01:53:18 +0000 |
commit | 4379bcd1f804f21e349614fbb385bdbd406eecc4 (patch) | |
tree | 57b98b64ecc98ae34a6c240a46830e7c17bf9aaa /device/bluetooth/bluetooth_device.h | |
parent | bef20d54ddb1f93e665ec7402f8d5731794c3f56 (diff) | |
download | chromium_src-4379bcd1f804f21e349614fbb385bdbd406eecc4.zip chromium_src-4379bcd1f804f21e349614fbb385bdbd406eecc4.tar.gz chromium_src-4379bcd1f804f21e349614fbb385bdbd406eecc4.tar.bz2 |
Fix bluetooth crashing issue, which happens due the pairing_delegate goes away, and BluetoothDeviceCallback not aware of this and keep calling it in the BT event callbacks. Cancel BT pairing event if user close the pairing dialog, so that BT device will cancel pairing, instead of waiting for timeout.
BUG=170540
Review URL: https://codereview.chromium.org/11926021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/bluetooth/bluetooth_device.h')
-rw-r--r-- | device/bluetooth/bluetooth_device.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h index 893b925..319b549 100644 --- a/device/bluetooth/bluetooth_device.h +++ b/device/bluetooth/bluetooth_device.h @@ -240,6 +240,9 @@ class BluetoothDevice { // // If the request fails, |error_callback| will be called; otherwise, // |callback| is called when the request is complete. + // After calling Connect, CancelPairing should be called to cancel the pairing + // process and release |pairing_delegate_| if user cancels the pairing and + // closes the pairing UI. virtual void Connect(PairingDelegate* pairing_delegate, const base::Closure& callback, const ConnectErrorCallback& error_callback) = 0; @@ -264,7 +267,8 @@ class BluetoothDevice { // Rejects a pairing or connection request from a remote device. virtual void RejectPairing() = 0; - // Cancels a pairing or connection attempt to a remote device. + // Cancels a pairing or connection attempt to a remote device or release + // |pairing_deleage_| and |agent_|. virtual void CancelPairing() = 0; // Disconnects the device, terminating the low-level ACL connection |