| 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 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
| 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ | 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 BluetoothRemoteGattCharacteristic::ValueCallback GetReadValueCallback( | 283 BluetoothRemoteGattCharacteristic::ValueCallback GetReadValueCallback( |
| 284 Call expected); | 284 Call expected); |
| 285 BluetoothAdapter::ErrorCallback GetErrorCallback(Call expected); | 285 BluetoothAdapter::ErrorCallback GetErrorCallback(Call expected); |
| 286 BluetoothDevice::ConnectErrorCallback GetConnectErrorCallback(Call expected); | 286 BluetoothDevice::ConnectErrorCallback GetConnectErrorCallback(Call expected); |
| 287 base::Callback<void(BluetoothRemoteGattService::GattErrorCode)> | 287 base::Callback<void(BluetoothRemoteGattService::GattErrorCode)> |
| 288 GetGattErrorCallback(Call expected); | 288 GetGattErrorCallback(Call expected); |
| 289 | 289 |
| 290 // Reset all event count members to 0. | 290 // Reset all event count members to 0. |
| 291 void ResetEventCounts(); | 291 void ResetEventCounts(); |
| 292 | 292 |
| 293 void RemoveTimedOutDevices(); |
| 294 |
| 293 // A Message loop is required by some implementations that will PostTasks and | 295 // A Message loop is required by some implementations that will PostTasks and |
| 294 // by base::RunLoop().RunUntilIdle() use in this fixture. | 296 // by base::RunLoop().RunUntilIdle() use in this fixture. |
| 295 base::MessageLoop message_loop_; | 297 base::MessageLoop message_loop_; |
| 296 | 298 |
| 297 scoped_refptr<BluetoothAdapter> adapter_; | 299 scoped_refptr<BluetoothAdapter> adapter_; |
| 298 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; | 300 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; |
| 299 ScopedVector<BluetoothGattConnection> gatt_connections_; | 301 ScopedVector<BluetoothGattConnection> gatt_connections_; |
| 300 enum BluetoothDevice::ConnectErrorCode last_connect_error_code_ = | 302 enum BluetoothDevice::ConnectErrorCode last_connect_error_code_ = |
| 301 BluetoothDevice::ERROR_UNKNOWN; | 303 BluetoothDevice::ERROR_UNKNOWN; |
| 302 ScopedVector<BluetoothGattNotifySession> notify_sessions_; | 304 ScopedVector<BluetoothGattNotifySession> notify_sessions_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 323 int actual_error_callback_calls_ = 0; | 325 int actual_error_callback_calls_ = 0; |
| 324 bool unexpected_success_callback_ = false; | 326 bool unexpected_success_callback_ = false; |
| 325 bool unexpected_error_callback_ = false; | 327 bool unexpected_error_callback_ = false; |
| 326 | 328 |
| 327 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; | 329 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; |
| 328 }; | 330 }; |
| 329 | 331 |
| 330 } // namespace device | 332 } // namespace device |
| 331 | 333 |
| 332 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ | 334 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
| OLD | NEW |