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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 // Reset all event count members to 0. | 467 // Reset all event count members to 0. |
468 void ResetEventCounts(); | 468 void ResetEventCounts(); |
469 | 469 |
470 void RemoveTimedOutDevices(); | 470 void RemoveTimedOutDevices(); |
471 | 471 |
472 // A Message loop is required by some implementations that will PostTasks and | 472 // A Message loop is required by some implementations that will PostTasks and |
473 // by base::RunLoop().RunUntilIdle() use in this fixture. | 473 // by base::RunLoop().RunUntilIdle() use in this fixture. |
474 base::MessageLoop message_loop_; | 474 base::MessageLoop message_loop_; |
475 | 475 |
476 scoped_refptr<BluetoothAdapter> adapter_; | 476 scoped_refptr<BluetoothAdapter> adapter_; |
477 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; | 477 std::vector<std::unique_ptr<BluetoothDiscoverySession>> discovery_sessions_; |
478 ScopedVector<BluetoothGattConnection> gatt_connections_; | 478 std::vector<std::unique_ptr<BluetoothGattConnection>> gatt_connections_; |
479 enum BluetoothDevice::ConnectErrorCode last_connect_error_code_ = | 479 enum BluetoothDevice::ConnectErrorCode last_connect_error_code_ = |
480 BluetoothDevice::ERROR_UNKNOWN; | 480 BluetoothDevice::ERROR_UNKNOWN; |
481 ScopedVector<BluetoothGattNotifySession> notify_sessions_; | 481 std::vector<std::unique_ptr<BluetoothGattNotifySession>> notify_sessions_; |
482 std::vector<uint8_t> last_read_value_; | 482 std::vector<uint8_t> last_read_value_; |
483 std::vector<uint8_t> last_write_value_; | 483 std::vector<uint8_t> last_write_value_; |
484 BluetoothRemoteGattService::GattErrorCode last_gatt_error_code_; | 484 BluetoothRemoteGattService::GattErrorCode last_gatt_error_code_; |
485 | 485 |
486 int callback_count_ = 0; | 486 int callback_count_ = 0; |
487 int error_callback_count_ = 0; | 487 int error_callback_count_ = 0; |
488 int gatt_connection_attempts_ = 0; | 488 int gatt_connection_attempts_ = 0; |
489 int gatt_disconnection_attempts_ = 0; | 489 int gatt_disconnection_attempts_ = 0; |
490 int gatt_discovery_attempts_ = 0; | 490 int gatt_discovery_attempts_ = 0; |
491 int gatt_notify_characteristic_attempts_ = 0; | 491 int gatt_notify_characteristic_attempts_ = 0; |
(...skipping 10 matching lines...) Expand all Loading... |
502 int actual_error_callback_calls_ = 0; | 502 int actual_error_callback_calls_ = 0; |
503 bool unexpected_success_callback_ = false; | 503 bool unexpected_success_callback_ = false; |
504 bool unexpected_error_callback_ = false; | 504 bool unexpected_error_callback_ = false; |
505 | 505 |
506 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; | 506 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; |
507 }; | 507 }; |
508 | 508 |
509 } // namespace device | 509 } // namespace device |
510 | 510 |
511 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ | 511 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
OLD | NEW |