Index: device/bluetooth/test/bluetooth_test.cc |
diff --git a/device/bluetooth/test/bluetooth_test.cc b/device/bluetooth/test/bluetooth_test.cc |
index 45425fa2ccb41e711329589a2545dd288f2c7a89..a487d413bca5254e17532a9e3d6b8fe5464dff88 100644 |
--- a/device/bluetooth/test/bluetooth_test.cc |
+++ b/device/bluetooth/test/bluetooth_test.cc |
@@ -41,10 +41,22 @@ void BluetoothTestBase::DiscoverySessionCallback( |
discovery_sessions_.push_back(discovery_session.release()); |
} |
+void BluetoothTestBase::GattConnectionCallback( |
+ scoped_ptr<BluetoothGattConnection> connection) { |
+ ++callback_count_; |
+ gatt_connections_.push_back(connection.release()); |
+} |
+ |
void BluetoothTestBase::ErrorCallback() { |
++error_callback_count_; |
} |
+void BluetoothTestBase::ConnectErrorCallback( |
+ enum BluetoothDevice::ConnectErrorCode error_code) { |
+ ++error_callback_count_; |
+ last_connect_error_code_ = error_code; |
+} |
+ |
base::Closure BluetoothTestBase::GetCallback() { |
return base::Bind(&BluetoothTestBase::Callback, base::Unretained(this)); |
} |
@@ -55,8 +67,20 @@ BluetoothTestBase::GetDiscoverySessionCallback() { |
base::Unretained(this)); |
} |
+BluetoothDevice::GattConnectionCallback |
+BluetoothTestBase::GetGattConnectionCallback() { |
+ return base::Bind(&BluetoothTestBase::GattConnectionCallback, |
+ base::Unretained(this)); |
Jeffrey Yasskin
2015/08/20 21:35:14
Generally comment why base::Unretained calls are c
scheib
2015/09/13 02:41:01
Done - moved to weak pointers.
|
+} |
+ |
BluetoothAdapter::ErrorCallback BluetoothTestBase::GetErrorCallback() { |
return base::Bind(&BluetoothTestBase::ErrorCallback, base::Unretained(this)); |
} |
+BluetoothDevice::ConnectErrorCallback |
+BluetoothTestBase::GetConnectErrorCallback() { |
+ return base::Bind(&BluetoothTestBase::ConnectErrorCallback, |
+ base::Unretained(this)); |
+} |
+ |
} // namespace device |