| 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 "device/bluetooth/bluetooth_adapter.h" | 7 #include "device/bluetooth/bluetooth_adapter.h" |
| 8 #include "device/bluetooth/bluetooth_device.h" | 8 #include "device/bluetooth/bluetooth_device.h" |
| 9 #include "device/bluetooth/bluetooth_discovery_session.h" | 9 #include "device/bluetooth/bluetooth_discovery_session.h" |
| 10 #include "device/bluetooth/bluetooth_uuid.h" | 10 #include "device/bluetooth/bluetooth_uuid.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 return GetUnconnectableDeviceAdapter(); | 100 return GetUnconnectableDeviceAdapter(); |
| 101 // New adapters | 101 // New adapters |
| 102 else if (fake_adapter_name == "BaseAdapter") | 102 else if (fake_adapter_name == "BaseAdapter") |
| 103 return GetBaseAdapter(); | 103 return GetBaseAdapter(); |
| 104 else if (fake_adapter_name == "ScanFilterCheckingAdapter") | 104 else if (fake_adapter_name == "ScanFilterCheckingAdapter") |
| 105 return GetScanFilterCheckingAdapter(); | 105 return GetScanFilterCheckingAdapter(); |
| 106 else if (fake_adapter_name == "EmptyAdapter") | 106 else if (fake_adapter_name == "EmptyAdapter") |
| 107 return GetEmptyAdapter(); | 107 return GetEmptyAdapter(); |
| 108 else if (fake_adapter_name == "FailStartDiscoveryAdapter") | 108 else if (fake_adapter_name == "FailStartDiscoveryAdapter") |
| 109 return GetFailStartDiscoveryAdapter(); | 109 return GetFailStartDiscoveryAdapter(); |
| 110 // TODO(ortuno): Remove MultiDeviceAdapter in follow up patch. | 110 else if (fake_adapter_name == "GlucoseHeartRateAdapter") |
| 111 else if (fake_adapter_name == "MultiDeviceAdapter" || | |
| 112 fake_adapter_name == "GlucoseHeartRateAdapter") | |
| 113 return GetGlucoseHeartRateAdapter(); | 111 return GetGlucoseHeartRateAdapter(); |
| 114 else if (fake_adapter_name == "") | 112 else if (fake_adapter_name == "") |
| 115 return NULL; | 113 return NULL; |
| 116 | 114 |
| 117 NOTREACHED() << fake_adapter_name; | 115 NOTREACHED() << fake_adapter_name; |
| 118 return NULL; | 116 return NULL; |
| 119 } | 117 } |
| 120 | 118 |
| 121 // static | 119 // static |
| 122 scoped_refptr<NiceMock<MockBluetoothAdapter>> | 120 scoped_refptr<NiceMock<MockBluetoothAdapter>> |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 scoped_ptr<NiceMock<MockBluetoothGattCharacteristic>> | 439 scoped_ptr<NiceMock<MockBluetoothGattCharacteristic>> |
| 442 LayoutTestBluetoothAdapterProvider::GetGattCharacteristic( | 440 LayoutTestBluetoothAdapterProvider::GetGattCharacteristic( |
| 443 MockBluetoothGattService* service, | 441 MockBluetoothGattService* service, |
| 444 const std::string& uuid) { | 442 const std::string& uuid) { |
| 445 return make_scoped_ptr(new NiceMock<MockBluetoothGattCharacteristic>( | 443 return make_scoped_ptr(new NiceMock<MockBluetoothGattCharacteristic>( |
| 446 service, uuid /* identifier */, BluetoothUUID(uuid), false /* is_local */, | 444 service, uuid /* identifier */, BluetoothUUID(uuid), false /* is_local */, |
| 447 NULL /* properties */, NULL /* permissions */)); | 445 NULL /* properties */, NULL /* permissions */)); |
| 448 } | 446 } |
| 449 | 447 |
| 450 } // namespace content | 448 } // namespace content |
| OLD | NEW |