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/sequenced_task_runner.h" |
10 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
11 #include "device/bluetooth/bluetooth_device.h" | 12 #include "device/bluetooth/bluetooth_device.h" |
12 #include "device/bluetooth/bluetooth_out_of_band_pairing_data.h" | 13 #include "device/bluetooth/bluetooth_out_of_band_pairing_data.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
14 | 15 |
15 namespace device { | 16 namespace device { |
16 | 17 |
17 class MockBluetoothAdapter; | 18 class MockBluetoothAdapter; |
18 | 19 |
19 class MockBluetoothDevice : public BluetoothDevice { | 20 class MockBluetoothDevice : public BluetoothDevice { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 MOCK_METHOD0(ConfirmPairing, void()); | 61 MOCK_METHOD0(ConfirmPairing, void()); |
61 MOCK_METHOD0(RejectPairing, void()); | 62 MOCK_METHOD0(RejectPairing, void()); |
62 MOCK_METHOD0(CancelPairing, void()); | 63 MOCK_METHOD0(CancelPairing, void()); |
63 MOCK_METHOD2(Disconnect, | 64 MOCK_METHOD2(Disconnect, |
64 void(const base::Closure& callback, | 65 void(const base::Closure& callback, |
65 const BluetoothDevice::ErrorCallback& error_callback)); | 66 const BluetoothDevice::ErrorCallback& error_callback)); |
66 MOCK_METHOD1(Forget, void(const BluetoothDevice::ErrorCallback&)); | 67 MOCK_METHOD1(Forget, void(const BluetoothDevice::ErrorCallback&)); |
67 MOCK_METHOD2(ConnectToService, | 68 MOCK_METHOD2(ConnectToService, |
68 void(const std::string&, | 69 void(const std::string&, |
69 const BluetoothDevice::SocketCallback&)); | 70 const BluetoothDevice::SocketCallback&)); |
70 MOCK_METHOD3(ConnectToProfile, | 71 MOCK_METHOD7(ConnectToProfile, |
71 void(BluetoothProfile*, | 72 void(BluetoothProfile* profile, |
72 const base::Closure&, | 73 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
73 const BluetoothDevice::ErrorCallback&)); | 74 scoped_refptr<base::SequencedTaskRunner> file_task_runner, |
| 75 net::NetLog* net_log, |
| 76 const net::NetLog::Source& source, |
| 77 const base::Closure& callback, |
| 78 const ErrorCallback& error_callback)); |
74 | 79 |
75 MOCK_METHOD3(SetOutOfBandPairingData, | 80 MOCK_METHOD3(SetOutOfBandPairingData, |
76 void(const BluetoothOutOfBandPairingData& data, | 81 void(const BluetoothOutOfBandPairingData& data, |
77 const base::Closure& callback, | 82 const base::Closure& callback, |
78 const BluetoothDevice::ErrorCallback& error_callback)); | 83 const BluetoothDevice::ErrorCallback& error_callback)); |
79 MOCK_METHOD2(ClearOutOfBandPairingData, | 84 MOCK_METHOD2(ClearOutOfBandPairingData, |
80 void(const base::Closure& callback, | 85 void(const base::Closure& callback, |
81 const BluetoothDevice::ErrorCallback& error_callback)); | 86 const BluetoothDevice::ErrorCallback& error_callback)); |
82 | 87 |
83 private: | 88 private: |
84 uint32 bluetooth_class_; | 89 uint32 bluetooth_class_; |
85 std::string name_; | 90 std::string name_; |
86 std::string address_; | 91 std::string address_; |
87 BluetoothDevice::ServiceList service_list_; | 92 BluetoothDevice::ServiceList service_list_; |
88 }; | 93 }; |
89 | 94 |
90 } // namespace device | 95 } // namespace device |
91 | 96 |
92 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ | 97 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ |
OLD | NEW |