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/bluetooth_adapter_bluez.h" | 5 #include "device/bluetooth/bluetooth_adapter_bluez.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 DCHECK_EQ(service->GetAdapter(), this); | 931 DCHECK_EQ(service->GetAdapter(), this); |
932 | 932 |
933 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, | 933 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, |
934 GattServiceChanged(this, service)); | 934 GattServiceChanged(this, service)); |
935 } | 935 } |
936 | 936 |
937 void BluetoothAdapterBlueZ::NotifyGattServicesDiscovered( | 937 void BluetoothAdapterBlueZ::NotifyGattServicesDiscovered( |
938 BluetoothDeviceBlueZ* device) { | 938 BluetoothDeviceBlueZ* device) { |
939 DCHECK(device->adapter_ == this); | 939 DCHECK(device->adapter_ == this); |
940 | 940 |
| 941 device->SetGattServicesDiscoveryComplete(true); |
941 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, | 942 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, |
942 GattServicesDiscovered(this, device)); | 943 GattServicesDiscovered(this, device)); |
943 } | 944 } |
944 | 945 |
945 void BluetoothAdapterBlueZ::NotifyGattDiscoveryComplete( | 946 void BluetoothAdapterBlueZ::NotifyGattDiscoveryComplete( |
946 BluetoothRemoteGattServiceBlueZ* service) { | 947 BluetoothRemoteGattServiceBlueZ* service) { |
947 DCHECK_EQ(service->GetAdapter(), this); | 948 DCHECK_EQ(service->GetAdapter(), this); |
948 | 949 |
949 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, | 950 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, |
950 GattDiscoveryCompleteForService(this, service)); | 951 GattDiscoveryCompleteForService(this, service)); |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1504 | 1505 |
1505 // If the queued request resulted in a pending call, then let it | 1506 // If the queued request resulted in a pending call, then let it |
1506 // asynchonously process the remaining queued requests once the pending | 1507 // asynchonously process the remaining queued requests once the pending |
1507 // call returns. | 1508 // call returns. |
1508 if (discovery_request_pending_) | 1509 if (discovery_request_pending_) |
1509 return; | 1510 return; |
1510 } | 1511 } |
1511 } | 1512 } |
1512 | 1513 |
1513 } // namespace bluez | 1514 } // namespace bluez |
OLD | NEW |