Index: device/bluetooth/test/mock_bluetooth_adapter.h |
diff --git a/device/bluetooth/test/mock_bluetooth_adapter.h b/device/bluetooth/test/mock_bluetooth_adapter.h |
index e1523f9a6eb5793153290d1814994da3e30ef026..dfa647337b7a41dc5126bfac05f007daadc6c8c3 100644 |
--- a/device/bluetooth/test/mock_bluetooth_adapter.h |
+++ b/device/bluetooth/test/mock_bluetooth_adapter.h |
@@ -8,10 +8,12 @@ |
#include <string> |
#include "base/callback.h" |
+#include "base/memory/scoped_vector.h" |
#include "device/bluetooth/bluetooth_adapter.h" |
#include "device/bluetooth/bluetooth_audio_sink.h" |
#include "device/bluetooth/bluetooth_device.h" |
#include "device/bluetooth/bluetooth_discovery_session.h" |
+#include "device/bluetooth/test/mock_bluetooth_device.h" |
#include "testing/gmock/include/gmock/gmock.h" |
namespace device { |
@@ -99,6 +101,11 @@ class MockBluetoothAdapter : public BluetoothAdapter { |
const DiscoverySessionCallback& callback, |
const ErrorCallback& error_callback); |
+ // BluetoothAdapter is supposed to manage the lifetime of BluetoothDevices. |
+ // This methods takes ownership of the BluetoothDevices. |
+ void AddMockDevice(scoped_ptr<MockBluetoothDevice> mock_device); |
+ BluetoothAdapter::ConstDeviceList GetMockDevices(); |
+ |
protected: |
void AddDiscoverySession(BluetoothDiscoveryFilter* discovery_filter, |
const base::Closure& callback, |
@@ -117,6 +124,8 @@ class MockBluetoothAdapter : public BluetoothAdapter { |
MOCK_METHOD1(RemovePairingDelegateInternal, |
void(BluetoothDevice::PairingDelegate* pairing_delegate)); |
+ |
+ ScopedVector<MockBluetoothDevice> mock_devices_; |
}; |
} // namespace device |