Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h" | 5 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 517 property_name == properties->alias.name() || | 517 property_name == properties->alias.name() || |
| 518 property_name == properties->paired.name() || | 518 property_name == properties->paired.name() || |
| 519 property_name == properties->trusted.name() || | 519 property_name == properties->trusted.name() || |
| 520 property_name == properties->connected.name() || | 520 property_name == properties->connected.name() || |
| 521 property_name == properties->uuids.name() || | 521 property_name == properties->uuids.name() || |
| 522 property_name == properties->rssi.name() || | 522 property_name == properties->rssi.name() || |
| 523 property_name == properties->tx_power.name()) { | 523 property_name == properties->tx_power.name()) { |
| 524 NotifyDeviceChanged(device_bluez); | 524 NotifyDeviceChanged(device_bluez); |
| 525 } | 525 } |
| 526 | 526 |
| 527 if (property_name == properties->gatt_services.name()) { | 527 if (property_name == properties->services_resolved.name() && |
| 528 properties->services_resolved.value()) { | |
| 528 device_bluez->SetGattServicesDiscoveryComplete(true); | 529 device_bluez->SetGattServicesDiscoveryComplete(true); |
|
ortuno
2016/04/26 14:12:14
You no longer need to set this value.
vudentz
2016/04/27 10:16:16
Done.
| |
| 529 NotifyGattServicesDiscovered(device_bluez); | 530 NotifyGattServicesDiscovered(device_bluez); |
| 530 } | 531 } |
| 531 | 532 |
| 532 // When a device becomes paired, mark it as trusted so that the user does | 533 // When a device becomes paired, mark it as trusted so that the user does |
| 533 // not need to approve every incoming connection | 534 // not need to approve every incoming connection |
| 534 if (property_name == properties->paired.name()) { | 535 if (property_name == properties->paired.name()) { |
| 535 if (properties->paired.value() && !properties->trusted.value()) { | 536 if (properties->paired.value() && !properties->trusted.value()) { |
| 536 device_bluez->SetTrusted(); | 537 device_bluez->SetTrusted(); |
| 537 } | 538 } |
| 538 NotifyDevicePairedChanged(device_bluez, properties->paired.value()); | 539 NotifyDevicePairedChanged(device_bluez, properties->paired.value()); |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1449 | 1450 |
| 1450 // If the queued request resulted in a pending call, then let it | 1451 // If the queued request resulted in a pending call, then let it |
| 1451 // asynchonously process the remaining queued requests once the pending | 1452 // asynchonously process the remaining queued requests once the pending |
| 1452 // call returns. | 1453 // call returns. |
| 1453 if (discovery_request_pending_) | 1454 if (discovery_request_pending_) |
| 1454 return; | 1455 return; |
| 1455 } | 1456 } |
| 1456 } | 1457 } |
| 1457 | 1458 |
| 1458 } // namespace bluez | 1459 } // namespace bluez |
| OLD | NEW |