| 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_DEVICE_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ |
| 6 #define DEVICE_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/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "device/bluetooth/bluetooth_device.h" | 11 #include "device/bluetooth/bluetooth_device.h" |
| 12 #include "device/bluetooth/bluetooth_out_of_band_pairing_data.h" | |
| 13 #include "device/bluetooth/bluetooth_uuid.h" | 12 #include "device/bluetooth/bluetooth_uuid.h" |
| 14 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
| 15 | 14 |
| 16 namespace device { | 15 namespace device { |
| 17 | 16 |
| 18 class MockBluetoothAdapter; | 17 class MockBluetoothAdapter; |
| 19 | 18 |
| 20 class MockBluetoothDevice : public BluetoothDevice { | 19 class MockBluetoothDevice : public BluetoothDevice { |
| 21 public: | 20 public: |
| 22 MockBluetoothDevice(MockBluetoothAdapter* adapter, | 21 MockBluetoothDevice(MockBluetoothAdapter* adapter, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 MOCK_METHOD1(Forget, void(const BluetoothDevice::ErrorCallback&)); | 64 MOCK_METHOD1(Forget, void(const BluetoothDevice::ErrorCallback&)); |
| 66 MOCK_METHOD3(ConnectToProfile, | 65 MOCK_METHOD3(ConnectToProfile, |
| 67 void(BluetoothProfile* profile, | 66 void(BluetoothProfile* profile, |
| 68 const base::Closure& callback, | 67 const base::Closure& callback, |
| 69 const ConnectToProfileErrorCallback& error_callback)); | 68 const ConnectToProfileErrorCallback& error_callback)); |
| 70 MOCK_METHOD3(ConnectToService, | 69 MOCK_METHOD3(ConnectToService, |
| 71 void(const BluetoothUUID& uuid, | 70 void(const BluetoothUUID& uuid, |
| 72 const ConnectToServiceCallback& callback, | 71 const ConnectToServiceCallback& callback, |
| 73 const ConnectToServiceErrorCallback& error_callback)); | 72 const ConnectToServiceErrorCallback& error_callback)); |
| 74 | 73 |
| 75 MOCK_METHOD3(SetOutOfBandPairingData, | |
| 76 void(const BluetoothOutOfBandPairingData& data, | |
| 77 const base::Closure& callback, | |
| 78 const BluetoothDevice::ErrorCallback& error_callback)); | |
| 79 MOCK_METHOD2(ClearOutOfBandPairingData, | |
| 80 void(const base::Closure& callback, | |
| 81 const BluetoothDevice::ErrorCallback& error_callback)); | |
| 82 MOCK_METHOD2(StartConnectionMonitor, | 74 MOCK_METHOD2(StartConnectionMonitor, |
| 83 void(const base::Closure& callback, | 75 void(const base::Closure& callback, |
| 84 const BluetoothDevice::ErrorCallback& error_callback)); | 76 const BluetoothDevice::ErrorCallback& error_callback)); |
| 85 | 77 |
| 86 MOCK_CONST_METHOD0(GetGattServices, std::vector<BluetoothGattService*>()); | 78 MOCK_CONST_METHOD0(GetGattServices, std::vector<BluetoothGattService*>()); |
| 87 MOCK_CONST_METHOD1(GetGattService, BluetoothGattService*(const std::string&)); | 79 MOCK_CONST_METHOD1(GetGattService, BluetoothGattService*(const std::string&)); |
| 88 | 80 |
| 89 private: | 81 private: |
| 90 uint32 bluetooth_class_; | 82 uint32 bluetooth_class_; |
| 91 std::string name_; | 83 std::string name_; |
| 92 std::string address_; | 84 std::string address_; |
| 93 BluetoothDevice::UUIDList uuids_; | 85 BluetoothDevice::UUIDList uuids_; |
| 94 }; | 86 }; |
| 95 | 87 |
| 96 } // namespace device | 88 } // namespace device |
| 97 | 89 |
| 98 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ | 90 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ |
| OLD | NEW |