OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MOCK_BLUETOOTH_ADAPTER_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ |
6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ | 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 void(const BluetoothAudioSink::Options& options, | 95 void(const BluetoothAudioSink::Options& options, |
96 const AcquiredCallback& callback, | 96 const AcquiredCallback& callback, |
97 const BluetoothAudioSink::ErrorCallback& error_callback)); | 97 const BluetoothAudioSink::ErrorCallback& error_callback)); |
98 | 98 |
99 void StartDiscoverySessionWithFilter( | 99 void StartDiscoverySessionWithFilter( |
100 scoped_ptr<BluetoothDiscoveryFilter> discovery_filter, | 100 scoped_ptr<BluetoothDiscoveryFilter> discovery_filter, |
101 const DiscoverySessionCallback& callback, | 101 const DiscoverySessionCallback& callback, |
102 const ErrorCallback& error_callback); | 102 const ErrorCallback& error_callback); |
103 | 103 |
104 // BluetoothAdapter is supposed to manage the lifetime of BluetoothDevices. | 104 // BluetoothAdapter is supposed to manage the lifetime of BluetoothDevices. |
105 // This methods takes ownership of the BluetoothDevices. This is only for | 105 // This method takes ownership of the MockBluetoothDevice. This is only for |
106 // convenience as far testing is concerned and it's possible to write test | 106 // convenience as far testing is concerned and it's possible to write test |
107 // cases without using these functions. | 107 // cases without using these functions. |
108 void AddMockDevice(scoped_ptr<MockBluetoothDevice> mock_device); | 108 void AddMockDevice(scoped_ptr<MockBluetoothDevice> mock_device); |
109 BluetoothAdapter::ConstDeviceList GetConstMockDevices(); | 109 BluetoothAdapter::ConstDeviceList GetConstMockDevices(); |
110 BluetoothAdapter::DeviceList GetMockDevices(); | 110 BluetoothAdapter::DeviceList GetMockDevices(); |
111 | 111 |
112 protected: | 112 protected: |
113 void AddDiscoverySession(BluetoothDiscoveryFilter* discovery_filter, | 113 void AddDiscoverySession(BluetoothDiscoveryFilter* discovery_filter, |
114 const base::Closure& callback, | 114 const base::Closure& callback, |
115 const ErrorCallback& error_callback) override; | 115 const ErrorCallback& error_callback) override; |
(...skipping 11 matching lines...) Expand all Loading... |
127 | 127 |
128 MOCK_METHOD1(RemovePairingDelegateInternal, | 128 MOCK_METHOD1(RemovePairingDelegateInternal, |
129 void(BluetoothDevice::PairingDelegate* pairing_delegate)); | 129 void(BluetoothDevice::PairingDelegate* pairing_delegate)); |
130 | 130 |
131 ScopedVector<MockBluetoothDevice> mock_devices_; | 131 ScopedVector<MockBluetoothDevice> mock_devices_; |
132 }; | 132 }; |
133 | 133 |
134 } // namespace device | 134 } // namespace device |
135 | 135 |
136 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ | 136 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ |
OLD | NEW |