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

Side by Side Diff: chromeos/dbus/fake_bluetooth_gatt_service_client.cc

Issue 402303002: bluetoothLowEnergy: Send onServiceAdded after all characteristics are discovered (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromeos/dbus/fake_bluetooth_gatt_service_client.h" 5 #include "chromeos/dbus/fake_bluetooth_gatt_service_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "chromeos/dbus/dbus_thread_manager.h" 10 #include "chromeos/dbus/dbus_thread_manager.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void FakeBluetoothGattServiceClient::ExposeHeartRateCharacteristics() { 175 void FakeBluetoothGattServiceClient::ExposeHeartRateCharacteristics() {
176 if (!IsHeartRateVisible()) { 176 if (!IsHeartRateVisible()) {
177 VLOG(2) << "Heart Rate service not visible. Not exposing characteristics."; 177 VLOG(2) << "Heart Rate service not visible. Not exposing characteristics.";
178 return; 178 return;
179 } 179 }
180 FakeBluetoothGattCharacteristicClient* char_client = 180 FakeBluetoothGattCharacteristicClient* char_client =
181 static_cast<FakeBluetoothGattCharacteristicClient*>( 181 static_cast<FakeBluetoothGattCharacteristicClient*>(
182 DBusThreadManager::Get()->GetBluetoothGattCharacteristicClient()); 182 DBusThreadManager::Get()->GetBluetoothGattCharacteristicClient());
183 char_client->ExposeHeartRateCharacteristics( 183 char_client->ExposeHeartRateCharacteristics(
184 dbus::ObjectPath(heart_rate_service_path_)); 184 dbus::ObjectPath(heart_rate_service_path_));
185
186 std::vector<dbus::ObjectPath> char_paths;
187 char_paths.push_back(char_client->GetHeartRateMeasurementPath());
188 char_paths.push_back(char_client->GetBodySensorLocationPath());
189 char_paths.push_back(char_client->GetHeartRateControlPointPath());
190
191 heart_rate_service_properties_->characteristics.ReplaceValue(char_paths);
185 } 192 }
186 193
187 } // namespace chromeos 194 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc ('k') | device/bluetooth/bluetooth_device_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698