| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/shell/browser/layout_test/layout_test_bluetooth_adapter_provid
er.h" | 5 #include "content/shell/browser/layout_test/layout_test_bluetooth_adapter_provid
er.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 std::set<BluetoothUUID> GetUUIDs( | 109 std::set<BluetoothUUID> GetUUIDs( |
| 110 const device::BluetoothDiscoveryFilter* filter) { | 110 const device::BluetoothDiscoveryFilter* filter) { |
| 111 std::set<BluetoothUUID> result; | 111 std::set<BluetoothUUID> result; |
| 112 filter->GetUUIDs(result); | 112 filter->GetUUIDs(result); |
| 113 return result; | 113 return result; |
| 114 } | 114 } |
| 115 | 115 |
| 116 // Notifies the adapter's observers that the services have been discovered. | 116 // Notifies the adapter's observers that the services have been discovered. |
| 117 void NotifyServicesDiscovered(MockBluetoothAdapter* adapter, | 117 void NotifyServicesDiscovered(MockBluetoothAdapter* adapter, |
| 118 MockBluetoothDevice* device) { | 118 MockBluetoothDevice* device) { |
| 119 device->SetGattServicesDiscoveryComplete(true); |
| 119 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, adapter->GetObservers(), | 120 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, adapter->GetObservers(), |
| 120 GattServicesDiscovered(adapter, device)); | 121 GattServicesDiscovered(adapter, device)); |
| 121 } | 122 } |
| 122 | 123 |
| 123 } // namespace | 124 } // namespace |
| 124 | 125 |
| 125 namespace content { | 126 namespace content { |
| 126 | 127 |
| 127 // static | 128 // static |
| 128 scoped_refptr<BluetoothAdapter> | 129 scoped_refptr<BluetoothAdapter> |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 return BluetoothUUID(); | 877 return BluetoothUUID(); |
| 877 } | 878 } |
| 878 | 879 |
| 879 // static | 880 // static |
| 880 std::string LayoutTestBluetoothAdapterProvider::makeMACAddress(uint64_t addr) { | 881 std::string LayoutTestBluetoothAdapterProvider::makeMACAddress(uint64_t addr) { |
| 881 return BluetoothDevice::CanonicalizeAddress( | 882 return BluetoothDevice::CanonicalizeAddress( |
| 882 base::StringPrintf("%012" PRIx64, addr)); | 883 base::StringPrintf("%012" PRIx64, addr)); |
| 883 } | 884 } |
| 884 | 885 |
| 885 } // namespace content | 886 } // namespace content |
| OLD | NEW |