OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "device/bluetooth/bluetooth_local_gatt_service.h" | 5 #include "device/bluetooth/bluetooth_local_gatt_service.h" |
6 | 6 |
| 7 #if defined(OS_CHROMEOS) || defined(OS_LINUX) |
| 8 #include "device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h" |
| 9 #endif |
| 10 |
7 namespace device { | 11 namespace device { |
8 | 12 |
| 13 // static |
| 14 base::WeakPtr<BluetoothLocalGattService> BluetoothLocalGattService::Create( |
| 15 BluetoothAdapter* adapter, |
| 16 const BluetoothUUID& uuid, |
| 17 bool is_primary, |
| 18 BluetoothLocalGattService* included_service, |
| 19 BluetoothLocalGattService::Delegate* delegate) { |
| 20 #if defined(OS_CHROMEOS) || defined(OS_LINUX) |
| 21 return bluez::BluetoothLocalGattServiceBlueZ::Create( |
| 22 adapter, uuid, is_primary, included_service, delegate); |
| 23 #else |
| 24 NOTIMPLEMENTED(); |
| 25 return nullptr; |
| 26 #endif |
| 27 } |
| 28 |
9 BluetoothLocalGattService::BluetoothLocalGattService() {} | 29 BluetoothLocalGattService::BluetoothLocalGattService() {} |
10 | 30 |
11 BluetoothLocalGattService::~BluetoothLocalGattService() {} | 31 BluetoothLocalGattService::~BluetoothLocalGattService() {} |
12 | 32 |
13 } // namespace device | 33 } // namespace device |
OLD | NEW |