| 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_uuid.h" | 12 #include "device/bluetooth/bluetooth_uuid.h" |
| 13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
| 14 | 14 |
| 15 namespace device { | 15 namespace device { |
| 16 | 16 |
| 17 class MockBluetoothAdapter; | 17 class MockBluetoothAdapter; |
| 18 | 18 |
| 19 class MockBluetoothDevice : public BluetoothDevice { | 19 class MockBluetoothDevice : public BluetoothDevice { |
| 20 public: | 20 public: |
| 21 MockBluetoothDevice(MockBluetoothAdapter* adapter, | 21 MockBluetoothDevice(MockBluetoothAdapter* adapter, |
| 22 uint32 bluetooth_class, | 22 uint32 bluetooth_class, |
| 23 const std::string& name, | 23 const std::string& name, |
| 24 const std::string& address, | 24 const std::string& address, |
| 25 bool paired, | 25 bool paired, |
| 26 bool connected); | 26 bool connected); |
| 27 virtual ~MockBluetoothDevice(); | 27 virtual ~MockBluetoothDevice(); |
| 28 | 28 |
| 29 MOCK_METHOD1(AddObserver, void(BluetoothDevice::Observer*)); | |
| 30 MOCK_METHOD1(RemoveObserver, void(BluetoothDevice::Observer*)); | |
| 31 MOCK_CONST_METHOD0(GetBluetoothClass, uint32()); | 29 MOCK_CONST_METHOD0(GetBluetoothClass, uint32()); |
| 32 MOCK_CONST_METHOD0(GetDeviceName, std::string()); | 30 MOCK_CONST_METHOD0(GetDeviceName, std::string()); |
| 33 MOCK_CONST_METHOD0(GetAddress, std::string()); | 31 MOCK_CONST_METHOD0(GetAddress, std::string()); |
| 34 MOCK_CONST_METHOD0(GetVendorIDSource, BluetoothDevice::VendorIDSource()); | 32 MOCK_CONST_METHOD0(GetVendorIDSource, BluetoothDevice::VendorIDSource()); |
| 35 MOCK_CONST_METHOD0(GetVendorID, uint16()); | 33 MOCK_CONST_METHOD0(GetVendorID, uint16()); |
| 36 MOCK_CONST_METHOD0(GetProductID, uint16()); | 34 MOCK_CONST_METHOD0(GetProductID, uint16()); |
| 37 MOCK_CONST_METHOD0(GetDeviceID, uint16()); | 35 MOCK_CONST_METHOD0(GetDeviceID, uint16()); |
| 38 MOCK_CONST_METHOD0(GetName, base::string16()); | 36 MOCK_CONST_METHOD0(GetName, base::string16()); |
| 39 MOCK_CONST_METHOD0(GetDeviceType, BluetoothDevice::DeviceType()); | 37 MOCK_CONST_METHOD0(GetDeviceType, BluetoothDevice::DeviceType()); |
| 40 MOCK_CONST_METHOD0(GetRSSI, int()); | 38 MOCK_CONST_METHOD0(GetRSSI, int()); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 private: | 78 private: |
| 81 uint32 bluetooth_class_; | 79 uint32 bluetooth_class_; |
| 82 std::string name_; | 80 std::string name_; |
| 83 std::string address_; | 81 std::string address_; |
| 84 BluetoothDevice::UUIDList uuids_; | 82 BluetoothDevice::UUIDList uuids_; |
| 85 }; | 83 }; |
| 86 | 84 |
| 87 } // namespace device | 85 } // namespace device |
| 88 | 86 |
| 89 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ | 87 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_ |
| OLD | NEW |