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_ADAPTER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_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 12 matching lines...) Expand all Loading... |
23 virtual ~Observer(); | 23 virtual ~Observer(); |
24 | 24 |
25 MOCK_METHOD2(AdapterPresentChanged, void(BluetoothAdapter*, bool)); | 25 MOCK_METHOD2(AdapterPresentChanged, void(BluetoothAdapter*, bool)); |
26 MOCK_METHOD2(AdapterPoweredChanged, void(BluetoothAdapter*, bool)); | 26 MOCK_METHOD2(AdapterPoweredChanged, void(BluetoothAdapter*, bool)); |
27 MOCK_METHOD2(AdapterDiscoveringChanged, void(BluetoothAdapter *, bool)); | 27 MOCK_METHOD2(AdapterDiscoveringChanged, void(BluetoothAdapter *, bool)); |
28 MOCK_METHOD2(DeviceAdded, void(BluetoothAdapter *, BluetoothDevice *)); | 28 MOCK_METHOD2(DeviceAdded, void(BluetoothAdapter *, BluetoothDevice *)); |
29 MOCK_METHOD2(DeviceChanged, void(BluetoothAdapter *, BluetoothDevice *)); | 29 MOCK_METHOD2(DeviceChanged, void(BluetoothAdapter *, BluetoothDevice *)); |
30 MOCK_METHOD2(DeviceRemoved, void(BluetoothAdapter *, BluetoothDevice *)); | 30 MOCK_METHOD2(DeviceRemoved, void(BluetoothAdapter *, BluetoothDevice *)); |
31 }; | 31 }; |
32 | 32 |
33 MockBluetoothAdapter(); | 33 MockBluetoothAdapter(const std::string& address, const std::string& name); |
34 | 34 |
35 MOCK_CONST_METHOD0(IsPresent, bool()); | 35 MOCK_CONST_METHOD0(IsPresent, bool()); |
36 MOCK_CONST_METHOD0(IsPowered, bool()); | 36 MOCK_CONST_METHOD0(IsPowered, bool()); |
37 MOCK_CONST_METHOD0(IsDiscovering, bool()); | 37 MOCK_CONST_METHOD0(IsDiscovering, bool()); |
38 MOCK_METHOD3(SetDiscovering, | 38 MOCK_METHOD3(SetDiscovering, |
39 void(bool discovering, | 39 void(bool discovering, |
40 const base::Closure& callback, | 40 const base::Closure& callback, |
41 const BluetoothAdapter::ErrorCallback& error_callback)); | 41 const BluetoothAdapter::ErrorCallback& error_callback)); |
42 MOCK_CONST_METHOD0(GetDevices, ConstDeviceList()); | 42 MOCK_CONST_METHOD0(GetDevices, ConstDeviceList()); |
43 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address)); | 43 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address)); |
44 MOCK_CONST_METHOD1(GetDevice, | 44 MOCK_CONST_METHOD1(GetDevice, |
45 const BluetoothDevice*(const std::string& address)); | 45 const BluetoothDevice*(const std::string& address)); |
46 MOCK_METHOD2( | 46 MOCK_METHOD2( |
47 ReadLocalOutOfBandPairingData, | 47 ReadLocalOutOfBandPairingData, |
48 void(const BluetoothAdapter::BluetoothOutOfBandPairingDataCallback& | 48 void(const BluetoothAdapter::BluetoothOutOfBandPairingDataCallback& |
49 callback, | 49 callback, |
50 const BluetoothAdapter::ErrorCallback& error_callback)); | 50 const BluetoothAdapter::ErrorCallback& error_callback)); |
51 protected: | 51 protected: |
52 virtual ~MockBluetoothAdapter(); | 52 virtual ~MockBluetoothAdapter(); |
53 }; | 53 }; |
54 | 54 |
55 } // namespace chromeos | 55 } // namespace chromeos |
56 | 56 |
57 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ | 57 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ |
OLD | NEW |