| 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 15 matching lines...) Expand all Loading... |
| 26 MOCK_METHOD2(AdapterDiscoveringChanged, void(BluetoothAdapter*, bool)); | 26 MOCK_METHOD2(AdapterDiscoveringChanged, void(BluetoothAdapter*, bool)); |
| 27 MOCK_METHOD2(DeviceAdded, void(BluetoothAdapter*, BluetoothDevice*)); | 27 MOCK_METHOD2(DeviceAdded, void(BluetoothAdapter*, BluetoothDevice*)); |
| 28 MOCK_METHOD2(DeviceChanged, void(BluetoothAdapter*, BluetoothDevice*)); | 28 MOCK_METHOD2(DeviceChanged, void(BluetoothAdapter*, BluetoothDevice*)); |
| 29 MOCK_METHOD2(DeviceRemoved, void(BluetoothAdapter*, BluetoothDevice*)); | 29 MOCK_METHOD2(DeviceRemoved, void(BluetoothAdapter*, BluetoothDevice*)); |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 MockBluetoothAdapter(); | 32 MockBluetoothAdapter(); |
| 33 | 33 |
| 34 MOCK_METHOD1(AddObserver, void(BluetoothAdapter::Observer*)); | 34 MOCK_METHOD1(AddObserver, void(BluetoothAdapter::Observer*)); |
| 35 MOCK_METHOD1(RemoveObserver, void(BluetoothAdapter::Observer*)); | 35 MOCK_METHOD1(RemoveObserver, void(BluetoothAdapter::Observer*)); |
| 36 MOCK_CONST_METHOD0(address, std::string()); | 36 MOCK_CONST_METHOD0(GetAddress, std::string()); |
| 37 MOCK_CONST_METHOD0(name, std::string()); | 37 MOCK_CONST_METHOD0(GetName, std::string()); |
| 38 MOCK_CONST_METHOD0(IsInitialized, bool()); | 38 MOCK_CONST_METHOD0(IsInitialized, bool()); |
| 39 MOCK_CONST_METHOD0(IsPresent, bool()); | 39 MOCK_CONST_METHOD0(IsPresent, bool()); |
| 40 MOCK_CONST_METHOD0(IsPowered, bool()); | 40 MOCK_CONST_METHOD0(IsPowered, bool()); |
| 41 MOCK_METHOD3(SetPowered, | 41 MOCK_METHOD3(SetPowered, |
| 42 void(bool discovering, | 42 void(bool discovering, |
| 43 const base::Closure& callback, | 43 const base::Closure& callback, |
| 44 const ErrorCallback& error_callback)); | 44 const ErrorCallback& error_callback)); |
| 45 MOCK_CONST_METHOD0(IsDiscovering, bool()); | 45 MOCK_CONST_METHOD0(IsDiscovering, bool()); |
| 46 MOCK_METHOD2(StartDiscovering, | 46 MOCK_METHOD2(StartDiscovering, |
| 47 void(const base::Closure& callback, | 47 void(const base::Closure& callback, |
| 48 const ErrorCallback& error_callback)); | 48 const ErrorCallback& error_callback)); |
| 49 MOCK_METHOD2(StopDiscovering, | 49 MOCK_METHOD2(StopDiscovering, |
| 50 void(const base::Closure& callback, | 50 void(const base::Closure& callback, |
| 51 const ErrorCallback& error_callback)); | 51 const ErrorCallback& error_callback)); |
| 52 MOCK_CONST_METHOD0(GetDevices, BluetoothAdapter::ConstDeviceList()); | 52 MOCK_CONST_METHOD0(GetDevices, BluetoothAdapter::ConstDeviceList()); |
| 53 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address)); | 53 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address)); |
| 54 MOCK_CONST_METHOD1(GetDevice, | 54 MOCK_CONST_METHOD1(GetDevice, |
| 55 const BluetoothDevice*(const std::string& address)); | 55 const BluetoothDevice*(const std::string& address)); |
| 56 MOCK_METHOD2( | 56 MOCK_METHOD2( |
| 57 ReadLocalOutOfBandPairingData, | 57 ReadLocalOutOfBandPairingData, |
| 58 void(const BluetoothOutOfBandPairingDataCallback& callback, | 58 void(const BluetoothOutOfBandPairingDataCallback& callback, |
| 59 const ErrorCallback& error_callback)); | 59 const ErrorCallback& error_callback)); |
| 60 protected: | 60 protected: |
| 61 virtual ~MockBluetoothAdapter(); | 61 virtual ~MockBluetoothAdapter(); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace device | 64 } // namespace device |
| 65 | 65 |
| 66 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ | 66 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ |
| OLD | NEW |