Chromium Code Reviews| Index: device/bluetooth/bluetooth_device_chromeos.h |
| diff --git a/device/bluetooth/bluetooth_device_chromeos.h b/device/bluetooth/bluetooth_device_chromeos.h |
| index 650207892671252dde2bc8b5e0833d2bd6b39b86..bf62f07a574260e73125684039b9587c85126466 100644 |
| --- a/device/bluetooth/bluetooth_device_chromeos.h |
| +++ b/device/bluetooth/bluetooth_device_chromeos.h |
| @@ -125,13 +125,35 @@ class BluetoothDeviceChromeOS |
| const BluetoothDeviceClient::ServiceMap& service_map, |
| bool success); |
| + // Called by CollectServiceRecordsCallback() every time the |service_records_| |
|
keybuk
2013/02/22 23:50:03
nit: drop the "the", it's cleaner
deymo
2013/02/23 00:43:16
Done.
|
| + // is updated. |OnServiceRecordsChanged| updates the derivated properties that |
|
keybuk
2013/02/22 23:50:03
nit: "derived" ... "derivated" is not a real word
deymo
2013/02/23 00:43:16
Done.
|
| + // depend on |service_records_|. |
| + void OnServiceRecordsChanged(void); |
| + |
| // Called by BluetoothProperty when the call to Set() for the Trusted |
| // property completes. |success| indicates whether or not the request |
| - // succeeded, |callback| and |error_callback| are the callbacks provided to |
| - // Connect(). |
| - void OnSetTrusted(const base::Closure& callback, |
| - const ErrorCallback& error_callback, |
| - bool success); |
| + // succeeded. |
| + void OnSetTrusted(bool success); |
| + |
| + // Called by BluetoothAdapterClient when a call to DiscoverServices() |
|
keybuk
2013/02/22 23:50:03
nit: GetServiceRecords()
deymo
2013/02/23 00:43:16
Done.
|
| + // fails. |callback| and |error_callback| are the callbacks provided to |
| + // GetServiceRecords. |
|
keybuk
2013/02/22 23:50:03
nit: needs a ()
deymo
2013/02/23 00:43:16
Done.
|
| + void OnGetServiceRecordsError(const ServiceRecordsCallback& callback, |
| + const ErrorCallback& error_callback); |
| + |
| + // Called by BluetoothAdapterClient when the initial call to |
| + // DiscoverServices() after pairing completes. |callback| and |error_callback| |
| + // are the callbacks provided to Connect(). |
| + void OnInitialGetServiceRecords(const base::Closure& callback, |
| + const ConnectErrorCallback& error_callback, |
| + const ServiceRecordList& list); |
| + |
| + // Called by BluetoothAdapterClient when the initial call to |
| + // DiscoverServices() after pairing fails. |callback| and |error_callback| |
| + // are the callbacks provided to Connect(). |
| + void OnInitialGetServiceRecordsError( |
| + const base::Closure& callback, |
| + const ConnectErrorCallback& error_callback); |
| // Connect application-level protocols of the device to the system, called |
| // on a successful connection or to reconnect to a device that is already |
| @@ -368,6 +390,13 @@ class BluetoothDeviceChromeOS |
| // Used to keep track of pending application connection requests. |
| int connecting_applications_counter_; |
| + // A service records cache. |
| + ServiceRecordList service_records_; |
| + |
| + // This says wether the |service_records_| cache is initialized. Note that an |
|
keybuk
2013/02/22 23:50:03
nit: whether
deymo
2013/02/23 00:43:16
Done.
|
| + // empty |service_records_| list can be a valid list. |
| + bool service_records_loaded_; |
| + |
| // Note: This should remain the last member so it'll be destroyed and |
| // invalidate its weak pointers before any other members are destroyed. |
| base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; |