| Index: device/bluetooth/adapter.h
|
| diff --git a/device/bluetooth/adapter.h b/device/bluetooth/adapter.h
|
| index e6e03940e0c504c2983e77c655bc2e442ecef65f..7c7a37590c1ff945d92b34866bb641321d1740a4 100644
|
| --- a/device/bluetooth/adapter.h
|
| +++ b/device/bluetooth/adapter.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "device/bluetooth/bluetooth_adapter.h"
|
| +#include "device/bluetooth/bluetooth_adapter_factory.h"
|
| #include "device/bluetooth/public/interfaces/adapter.mojom.h"
|
|
|
| namespace bluetooth {
|
| @@ -21,7 +22,7 @@ class Adapter : public mojom::Adapter,
|
| Adapter();
|
| ~Adapter() override;
|
|
|
| - // Creates an Adapter with a strong Mojo binding to |request|
|
| + // Creates an Adapter with a strong Mojo binding to |request|.
|
| static void Create(mojom::AdapterRequest request);
|
|
|
| // mojom::Adapter overrides:
|
| @@ -35,13 +36,19 @@ class Adapter : public mojom::Adapter,
|
| device::BluetoothDevice* device) override;
|
|
|
| private:
|
| - mojom::DeviceInfoPtr ConstructDeviceInfoStruct(
|
| - const device::BluetoothDevice* device) const;
|
| + // Creates a mojom::DeviceInfo using info from the given |device|.
|
| + static mojom::DeviceInfoPtr ConstructDeviceInfoStruct(
|
| + const device::BluetoothDevice* const device);
|
|
|
| - void GetDevicesImpl(const GetDevicesCallback& callback);
|
| + // Gets a BluetoothAdapter, adds this as an observer, then executes |action|.
|
| + void WithAdapter(
|
| + const device::BluetoothAdapterFactory::AdapterCallback& action);
|
| +
|
| + // Stores |adapter| in adapter_ and sets this as an observer of |adapter|.
|
| + void OnGetAdapter(
|
| + const device::BluetoothAdapterFactory::AdapterCallback& continuation,
|
| + scoped_refptr<device::BluetoothAdapter> adapter);
|
|
|
| - void OnGetAdapter(const base::Closure& continuation,
|
| - scoped_refptr<device::BluetoothAdapter> adapter);
|
| // The current Bluetooth adapter.
|
| scoped_refptr<device::BluetoothAdapter> adapter_;
|
|
|
|
|