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

Unified Diff: device/bluetooth/bluetooth_device.h

Issue 652403002: [Clean up] Expose ConnectToServiceInsecurely as a BluetoothDevice API on all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase: Restore deps rather than public_deps Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/BUILD.gn ('k') | device/bluetooth/bluetooth_device_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device.h
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h
index 4557f3b5e0b795ca221ddea8f3ceaf08603c94e2..2f3a96b3edae3cbf62346ddb71a6458bcfebcbbb 100644
--- a/device/bluetooth/bluetooth_device.h
+++ b/device/bluetooth/bluetooth_device.h
@@ -356,6 +356,19 @@ class BluetoothDevice {
const ConnectToServiceCallback& callback,
const ConnectToServiceErrorCallback& error_callback) = 0;
+ // Attempts to initiate an insecure outgoing L2CAP or RFCOMM connection to the
+ // advertised service on this device matching |uuid|, performing an SDP lookup
+ // if necessary to determine the correct protocol and channel for the
+ // connection. Unlike ConnectToService, the outgoing connection will request
+ // no bonding rather than general bonding. |callback| will be called on a
+ // successful connection with a BluetoothSocket instance that is to be owned
+ // by the receiver. |error_callback| will be called on failure with a message
+ // indicating the cause.
+ virtual void ConnectToServiceInsecurely(
+ const device::BluetoothUUID& uuid,
+ const ConnectToServiceCallback& callback,
+ const ConnectToServiceErrorCallback& error_callback) = 0;
+
// Opens a new GATT connection to this device. On success, a new
// BluetoothGattConnection will be handed to the caller via |callback|. On
// error, |error_callback| will be called. The connection will be kept alive,
« no previous file with comments | « device/bluetooth/BUILD.gn ('k') | device/bluetooth/bluetooth_device_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698