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

Unified Diff: device/bluetooth/test/bluetooth_test.cc

Issue 1422463012: bluetooth: android: Implement StartNotifySession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed ortuno Created 5 years, 1 month 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/test/bluetooth_test.h ('k') | device/bluetooth/test/bluetooth_test_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/bluetooth_test.cc
diff --git a/device/bluetooth/test/bluetooth_test.cc b/device/bluetooth/test/bluetooth_test.cc
index e35ee87cca2d575818524bbe9faed351ebc68bc1..70d457f634f363c8d16d6f22b2d100fb488d4482 100644
--- a/device/bluetooth/test/bluetooth_test.cc
+++ b/device/bluetooth/test/bluetooth_test.cc
@@ -64,6 +64,12 @@ void BluetoothTestBase::GattConnectionCallback(
gatt_connections_.push_back(connection.release());
}
+void BluetoothTestBase::NotifyCallback(
+ scoped_ptr<BluetoothGattNotifySession> notify_session) {
+ ++callback_count_;
+ notify_sessions_.push_back(notify_session.release());
+}
+
void BluetoothTestBase::ReadValueCallback(const std::vector<uint8>& value) {
++callback_count_;
last_read_value_ = value;
@@ -101,6 +107,12 @@ BluetoothTestBase::GetGattConnectionCallback() {
weak_factory_.GetWeakPtr());
}
+BluetoothGattCharacteristic::NotifySessionCallback
+BluetoothTestBase::GetNotifyCallback() {
+ return base::Bind(&BluetoothTestBase::NotifyCallback,
+ weak_factory_.GetWeakPtr());
+}
+
BluetoothGattCharacteristic::ValueCallback
BluetoothTestBase::GetReadValueCallback() {
return base::Bind(&BluetoothTestBase::ReadValueCallback,
@@ -131,6 +143,7 @@ void BluetoothTestBase::ResetEventCounts() {
gatt_connection_attempts_ = 0;
gatt_disconnection_attempts_ = 0;
gatt_discovery_attempts_ = 0;
+ gatt_notify_characteristic_attempts_ = 0;
gatt_read_characteristic_attempts_ = 0;
gatt_write_characteristic_attempts_ = 0;
}
« no previous file with comments | « device/bluetooth/test/bluetooth_test.h ('k') | device/bluetooth/test/bluetooth_test_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698