diff options
author | armansito@chromium.org <armansito@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-08 05:18:28 +0000 |
---|---|---|
committer | armansito@chromium.org <armansito@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-08 05:18:28 +0000 |
commit | e65bc222634ed32194386ba1c0785cc93499309d (patch) | |
tree | ebba25c995609f5a1b0ef8ec62f2cefd2df433e1 /chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc | |
parent | 05e5d16199f7c4c91e4024b6b7c2f2d9f8ace930 (diff) | |
download | chromium_src-e65bc222634ed32194386ba1c0785cc93499309d.zip chromium_src-e65bc222634ed32194386ba1c0785cc93499309d.tar.gz chromium_src-e65bc222634ed32194386ba1c0785cc93499309d.tar.bz2 |
device/bluetooth: Add chromeos::BluetoothRemoteGattServiceChromeOS.
Added the chromeos::BluetoothRemoteGattServiceChromeOS class which implements
a remote instance of device::BluetoothGattService for the Chrome OS
platform. This CL also introduces some minor changes to the GATT API,
namely removing the characteristic and descriptor Observer interfaces.
Addition, removal, and value changes of remote characteristics will instead
be tracked via BluetoothGattService::Observer.
BUG=360266,340529
TEST=device_unittests
Review URL: https://codereview.chromium.org/224953003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262327 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc')
-rw-r--r-- | chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc index 85408b8..c25e71c 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc +++ b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc @@ -209,21 +209,21 @@ void FakeBluetoothGattCharacteristicClient::ExposeHeartRateCharacteristics( void FakeBluetoothGattCharacteristicClient::HideHeartRateCharacteristics() { VLOG(2) << "Hiding fake Heart Rate characteristics."; + + // Notify the observers before deleting the properties structures so that they + // can be accessed from the observer method. + NotifyCharacteristicRemoved(dbus::ObjectPath(heart_rate_measurement_path_)); + NotifyCharacteristicRemoved(dbus::ObjectPath(body_sensor_location_path_)); + NotifyCharacteristicRemoved(dbus::ObjectPath(heart_rate_control_point_path_)); + heart_rate_measurement_properties_.reset(); body_sensor_location_properties_.reset(); heart_rate_control_point_properties_.reset(); - std::string hrm_path = heart_rate_measurement_path_; heart_rate_measurement_path_.clear(); - std::string bsl_path = body_sensor_location_path_; body_sensor_location_path_.clear(); - std::string hrcp_path = heart_rate_control_point_path_; heart_rate_control_point_path_.clear(); heart_rate_visible_ = false; - - NotifyCharacteristicRemoved(dbus::ObjectPath(hrm_path)); - NotifyCharacteristicRemoved(dbus::ObjectPath(bsl_path)); - NotifyCharacteristicRemoved(dbus::ObjectPath(hrcp_path)); } void FakeBluetoothGattCharacteristicClient::OnPropertyChanged( |