Index: device/bluetooth/adapter.h |
diff --git a/device/bluetooth/adapter.h b/device/bluetooth/adapter.h |
index e6e03940e0c504c2983e77c655bc2e442ecef65f..bde7e36a093e20f8cdb5925a6849405f2e0dd356 100644 |
--- a/device/bluetooth/adapter.h |
+++ b/device/bluetooth/adapter.h |
@@ -7,23 +7,21 @@ |
#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 { |
-// Implementation of Mojo BluetoothAdapter located in |
-// device/bluetooth/public/interfaces/bluetooth.mojom. |
+// Implementation of Mojo Adapter located in |
+// device/bluetooth/public/interfaces/adapter.mojom. |
// It handles requests for Bluetooth adapter capabilities |
// and devices and uses the platform abstraction of device/bluetooth. |
class Adapter : public mojom::Adapter, |
public device::BluetoothAdapter::Observer { |
public: |
- Adapter(); |
+ explicit Adapter(scoped_refptr<device::BluetoothAdapter> adapter); |
~Adapter() override; |
- // Creates an Adapter with a strong Mojo binding to |request| |
- static void Create(mojom::AdapterRequest request); |
- |
// mojom::Adapter overrides: |
void GetDevices(const GetDevicesCallback& callback) override; |
void SetClient(mojom::AdapterClientPtr client) override; |
@@ -35,13 +33,10 @@ class Adapter : public mojom::Adapter, |
device::BluetoothDevice* device) override; |
private: |
- mojom::DeviceInfoPtr ConstructDeviceInfoStruct( |
- const device::BluetoothDevice* device) const; |
- |
- void GetDevicesImpl(const GetDevicesCallback& callback); |
+ // Creates a mojom::DeviceInfo using info from the given |device|. |
+ static mojom::DeviceInfoPtr ConstructDeviceInfoStruct( |
+ const device::BluetoothDevice* const device); |
dcheng
2016/10/06 04:01:39
Nit: The second const here isn't necessary
(it's
mbrunson
2016/10/06 20:25:57
Done.
|
- void OnGetAdapter(const base::Closure& continuation, |
- scoped_refptr<device::BluetoothAdapter> adapter); |
// The current Bluetooth adapter. |
scoped_refptr<device::BluetoothAdapter> adapter_; |