| 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 CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ | 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h" | 11 #include "device/bluetooth/bluetooth_device.h" |
| 12 #include "chromeos/dbus/bluetooth_out_of_band_pairing_data.h" | 12 #include "device/bluetooth/bluetooth_out_of_band_pairing_data.h" |
| 13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
| 14 | 14 |
| 15 namespace chromeos { | 15 namespace bluetooth { |
| 16 |
| 17 class MockBluetoothAdapter; |
| 16 | 18 |
| 17 class MockBluetoothDevice : public BluetoothDevice { | 19 class MockBluetoothDevice : public BluetoothDevice { |
| 18 public: | 20 public: |
| 19 MockBluetoothDevice(MockBluetoothAdapter* adapter, | 21 MockBluetoothDevice(MockBluetoothAdapter* adapter, |
| 20 const std::string& name, | 22 const std::string& name, |
| 21 const std::string& address, | 23 const std::string& address, |
| 22 bool paired, | 24 bool paired, |
| 23 bool bonded, | 25 bool bonded, |
| 24 bool connected); | 26 bool connected); |
| 25 virtual ~MockBluetoothDevice(); | 27 virtual ~MockBluetoothDevice(); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 52 MOCK_METHOD0(CancelPairing, void()); | 54 MOCK_METHOD0(CancelPairing, void()); |
| 53 MOCK_METHOD2(Disconnect, | 55 MOCK_METHOD2(Disconnect, |
| 54 void(const base::Closure& callback, | 56 void(const base::Closure& callback, |
| 55 const BluetoothDevice::ErrorCallback& error_callback)); | 57 const BluetoothDevice::ErrorCallback& error_callback)); |
| 56 MOCK_METHOD1(Forget, void(const BluetoothDevice::ErrorCallback&)); | 58 MOCK_METHOD1(Forget, void(const BluetoothDevice::ErrorCallback&)); |
| 57 MOCK_METHOD2(ConnectToService, | 59 MOCK_METHOD2(ConnectToService, |
| 58 void(const std::string&, | 60 void(const std::string&, |
| 59 const BluetoothDevice::SocketCallback&)); | 61 const BluetoothDevice::SocketCallback&)); |
| 60 | 62 |
| 61 MOCK_METHOD3(SetOutOfBandPairingData, | 63 MOCK_METHOD3(SetOutOfBandPairingData, |
| 62 void(const chromeos::BluetoothOutOfBandPairingData& data, | 64 void(const bluetooth::BluetoothOutOfBandPairingData& data, |
| 63 const base::Closure& callback, | 65 const base::Closure& callback, |
| 64 const BluetoothDevice::ErrorCallback& error_callback)); | 66 const BluetoothDevice::ErrorCallback& error_callback)); |
| 65 MOCK_METHOD2(ClearOutOfBandPairingData, | 67 MOCK_METHOD2(ClearOutOfBandPairingData, |
| 66 void(const base::Closure& callback, | 68 void(const base::Closure& callback, |
| 67 const BluetoothDevice::ErrorCallback& error_callback)); | 69 const BluetoothDevice::ErrorCallback& error_callback)); |
| 68 | 70 |
| 69 private: | 71 private: |
| 70 string16 name_; | 72 string16 name_; |
| 71 std::string address_; | 73 std::string address_; |
| 72 BluetoothDevice::ServiceList service_list_; | 74 BluetoothDevice::ServiceList service_list_; |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 } // namespace chromeos | 77 } // namespace bluetooth |
| 76 | 78 |
| 77 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ | 79 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ |
| OLD | NEW |