| 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 #ifndef DEVICE_BLUETOOTH_ADAPTER_H_ | 5 #ifndef DEVICE_BLUETOOTH_ADAPTER_H_ |
| 6 #define DEVICE_BLUETOOTH_ADAPTER_H_ | 6 #define DEVICE_BLUETOOTH_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 void GetDevice(const std::string& address, | 30 void GetDevice(const std::string& address, |
| 31 const GetDeviceCallback& callback) override; | 31 const GetDeviceCallback& callback) override; |
| 32 void GetDevices(const GetDevicesCallback& callback) override; | 32 void GetDevices(const GetDevicesCallback& callback) override; |
| 33 void SetClient(mojom::AdapterClientPtr client) override; | 33 void SetClient(mojom::AdapterClientPtr client) override; |
| 34 | 34 |
| 35 // device::BluetoothAdapter::Observer overrides: | 35 // device::BluetoothAdapter::Observer overrides: |
| 36 void DeviceAdded(device::BluetoothAdapter* adapter, | 36 void DeviceAdded(device::BluetoothAdapter* adapter, |
| 37 device::BluetoothDevice* device) override; | 37 device::BluetoothDevice* device) override; |
| 38 void DeviceRemoved(device::BluetoothAdapter* adapter, | 38 void DeviceRemoved(device::BluetoothAdapter* adapter, |
| 39 device::BluetoothDevice* device) override; | 39 device::BluetoothDevice* device) override; |
| 40 void DeviceChanged(device::BluetoothAdapter* adapter, |
| 41 device::BluetoothDevice* device) override; |
| 40 | 42 |
| 41 private: | 43 private: |
| 42 // The current Bluetooth adapter. | 44 // The current Bluetooth adapter. |
| 43 scoped_refptr<device::BluetoothAdapter> adapter_; | 45 scoped_refptr<device::BluetoothAdapter> adapter_; |
| 44 | 46 |
| 45 // The adapter client that listens to this service. | 47 // The adapter client that listens to this service. |
| 46 mojom::AdapterClientPtr client_; | 48 mojom::AdapterClientPtr client_; |
| 47 | 49 |
| 48 base::WeakPtrFactory<Adapter> weak_ptr_factory_; | 50 base::WeakPtrFactory<Adapter> weak_ptr_factory_; |
| 49 | 51 |
| 50 DISALLOW_COPY_AND_ASSIGN(Adapter); | 52 DISALLOW_COPY_AND_ASSIGN(Adapter); |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 } // namespace bluetooth | 55 } // namespace bluetooth |
| 54 | 56 |
| 55 #endif // DEVICE_BLUETOOTH_ADAPTER_H_ | 57 #endif // DEVICE_BLUETOOTH_ADAPTER_H_ |
| OLD | NEW |