bluetooth_adapter_chromeos.cc 634 B

12345678910111213141516171819
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h"
  5. #include "device/bluetooth/floss/bluetooth_adapter_floss.h"
  6. #include "device/bluetooth/floss/floss_features.h"
  7. namespace device {
  8. scoped_refptr<device::BluetoothAdapter> BluetoothAdapter::CreateAdapter() {
  9. if (floss::features::IsFlossEnabled()) {
  10. return floss::BluetoothAdapterFloss::CreateAdapter();
  11. } else {
  12. return bluez::BluetoothAdapterBlueZ::CreateAdapter();
  13. }
  14. }
  15. } // namespace device