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

Unified Diff: device/bluetooth/bluetooth_local_gatt_characteristic.cc

Issue 1920693002: Complete //device/bt implementation for hosting local GATT attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: device/bluetooth/bluetooth_local_gatt_characteristic.cc
diff --git a/device/bluetooth/bluetooth_local_gatt_characteristic.cc b/device/bluetooth/bluetooth_local_gatt_characteristic.cc
index 9d4d37aac2372db8fbf23f5ac70740c920cf725a..873307d9eddecd57b0d2ba0072a632ef7010f80d 100644
--- a/device/bluetooth/bluetooth_local_gatt_characteristic.cc
+++ b/device/bluetooth/bluetooth_local_gatt_characteristic.cc
@@ -7,6 +7,10 @@
#include "base/logging.h"
#include "device/bluetooth/bluetooth_local_gatt_service.h"
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+#include "device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h"
+#endif
+
namespace device {
BluetoothLocalGattCharacteristic::BluetoothLocalGattCharacteristic() {}
@@ -14,14 +18,18 @@ BluetoothLocalGattCharacteristic::BluetoothLocalGattCharacteristic() {}
BluetoothLocalGattCharacteristic::~BluetoothLocalGattCharacteristic() {}
// static
-BluetoothLocalGattCharacteristic* BluetoothLocalGattCharacteristic::Create(
- const BluetoothUUID& uuid,
- const std::vector<uint8_t>& value,
- Properties properties,
- Permissions permissions,
- BluetoothLocalGattService* service) {
+base::WeakPtr<BluetoothLocalGattCharacteristic>
+BluetoothLocalGattCharacteristic::Create(const BluetoothUUID& uuid,
+ Properties properties,
+ Permissions permissions,
+ BluetoothLocalGattService* service) {
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+ return bluez::BluetoothLocalGattCharacteristicBlueZ::Create(
+ uuid, properties, permissions, service);
+#else
NOTIMPLEMENTED();
- return NULL;
+ return nullptr;
+#endif
}
} // namespace device

Powered by Google App Engine
This is Rietveld 408576698