Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: device/bluetooth/test/mock_bluetooth_adapter.h

Issue 1415573014: Reland "Add Linux support for the Bluetooth API" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_ADAPTER_H_ 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_
6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ 6 #define DEVICE_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 19 matching lines...) Expand all
30 MOCK_METHOD2(AdapterDiscoveringChanged, void(BluetoothAdapter*, bool)); 30 MOCK_METHOD2(AdapterDiscoveringChanged, void(BluetoothAdapter*, bool));
31 MOCK_METHOD2(DeviceAdded, void(BluetoothAdapter*, BluetoothDevice*)); 31 MOCK_METHOD2(DeviceAdded, void(BluetoothAdapter*, BluetoothDevice*));
32 MOCK_METHOD2(DeviceChanged, void(BluetoothAdapter*, BluetoothDevice*)); 32 MOCK_METHOD2(DeviceChanged, void(BluetoothAdapter*, BluetoothDevice*));
33 MOCK_METHOD2(DeviceRemoved, void(BluetoothAdapter*, BluetoothDevice*)); 33 MOCK_METHOD2(DeviceRemoved, void(BluetoothAdapter*, BluetoothDevice*));
34 }; 34 };
35 35
36 MockBluetoothAdapter(); 36 MockBluetoothAdapter();
37 37
38 virtual bool IsInitialized() const { return true; } 38 virtual bool IsInitialized() const { return true; }
39 39
40 #if defined(OS_CHROMEOS) 40 #if defined(OS_CHROMEOS) || defined(OS_LINUX)
41 void Shutdown() override; 41 void Shutdown() override;
42 #endif 42 #endif
43 MOCK_METHOD1(AddObserver, void(BluetoothAdapter::Observer*)); 43 MOCK_METHOD1(AddObserver, void(BluetoothAdapter::Observer*));
44 MOCK_METHOD1(RemoveObserver, void(BluetoothAdapter::Observer*)); 44 MOCK_METHOD1(RemoveObserver, void(BluetoothAdapter::Observer*));
45 MOCK_CONST_METHOD0(GetAddress, std::string()); 45 MOCK_CONST_METHOD0(GetAddress, std::string());
46 MOCK_CONST_METHOD0(GetName, std::string()); 46 MOCK_CONST_METHOD0(GetName, std::string());
47 MOCK_METHOD3(SetName, 47 MOCK_METHOD3(SetName,
48 void(const std::string& name, 48 void(const std::string& name,
49 const base::Closure& callback, 49 const base::Closure& callback,
50 const ErrorCallback& error_callback)); 50 const ErrorCallback& error_callback));
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 MOCK_METHOD1(RemovePairingDelegateInternal, 138 MOCK_METHOD1(RemovePairingDelegateInternal,
139 void(BluetoothDevice::PairingDelegate* pairing_delegate)); 139 void(BluetoothDevice::PairingDelegate* pairing_delegate));
140 140
141 ScopedVector<MockBluetoothDevice> mock_devices_; 141 ScopedVector<MockBluetoothDevice> mock_devices_;
142 }; 142 };
143 143
144 } // namespace device 144 } // namespace device
145 145
146 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ 146 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698