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

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

Issue 179123008: Migrate chrome.bluetooth API backend to use device::BluetoothDiscoverySession. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved constructors around a bit. Gonna try this time. Created 6 years, 9 months 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 | Annotate | Revision Log
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 MOCK_METHOD3(SetPowered, 45 MOCK_METHOD3(SetPowered,
46 void(bool powered, 46 void(bool powered,
47 const base::Closure& callback, 47 const base::Closure& callback,
48 const ErrorCallback& error_callback)); 48 const ErrorCallback& error_callback));
49 MOCK_CONST_METHOD0(IsDiscoverable, bool()); 49 MOCK_CONST_METHOD0(IsDiscoverable, bool());
50 MOCK_METHOD3(SetDiscoverable, 50 MOCK_METHOD3(SetDiscoverable,
51 void(bool discoverable, 51 void(bool discoverable,
52 const base::Closure& callback, 52 const base::Closure& callback,
53 const ErrorCallback& error_callback)); 53 const ErrorCallback& error_callback));
54 MOCK_CONST_METHOD0(IsDiscovering, bool()); 54 MOCK_CONST_METHOD0(IsDiscovering, bool());
55 MOCK_METHOD2(StartDiscoverySession,
56 void(const DiscoverySessionCallback& callback,
57 const ErrorCallback& error_callback));
55 MOCK_METHOD2(StartDiscovering, 58 MOCK_METHOD2(StartDiscovering,
56 void(const base::Closure& callback, 59 void(const base::Closure& callback,
57 const ErrorCallback& error_callback)); 60 const ErrorCallback& error_callback));
58 MOCK_METHOD2(StopDiscovering, 61 MOCK_METHOD2(StopDiscovering,
59 void(const base::Closure& callback, 62 void(const base::Closure& callback,
60 const ErrorCallback& error_callback)); 63 const ErrorCallback& error_callback));
61 MOCK_CONST_METHOD0(GetDevices, BluetoothAdapter::ConstDeviceList()); 64 MOCK_CONST_METHOD0(GetDevices, BluetoothAdapter::ConstDeviceList());
62 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address)); 65 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address));
63 MOCK_CONST_METHOD1(GetDevice, 66 MOCK_CONST_METHOD1(GetDevice,
64 const BluetoothDevice*(const std::string& address)); 67 const BluetoothDevice*(const std::string& address));
65 MOCK_METHOD2( 68 MOCK_METHOD2(
66 ReadLocalOutOfBandPairingData, 69 ReadLocalOutOfBandPairingData,
67 void(const BluetoothOutOfBandPairingDataCallback& callback, 70 void(const BluetoothOutOfBandPairingDataCallback& callback,
68 const ErrorCallback& error_callback)); 71 const ErrorCallback& error_callback));
69 MOCK_METHOD2(AddPairingDelegate, 72 MOCK_METHOD2(AddPairingDelegate,
70 void(BluetoothDevice::PairingDelegate* pairing_delegate, 73 void(BluetoothDevice::PairingDelegate* pairing_delegate,
71 enum PairingDelegatePriority priority)); 74 enum PairingDelegatePriority priority));
72 MOCK_METHOD1(RemovePairingDelegate, 75 MOCK_METHOD1(RemovePairingDelegate,
73 void(BluetoothDevice::PairingDelegate* pairing_delegate)); 76 void(BluetoothDevice::PairingDelegate* pairing_delegate));
74 MOCK_METHOD0(DefaultPairingDelegate, BluetoothDevice::PairingDelegate*()); 77 MOCK_METHOD0(DefaultPairingDelegate, BluetoothDevice::PairingDelegate*());
75 78
76 protected: 79 protected:
77 MOCK_METHOD2(AddDiscoverySession, 80 virtual void AddDiscoverySession(const base::Closure& callback,
78 void(const base::Closure& callback, 81 const ErrorCallback& error_callback);
79 const ErrorCallback& error_callback)); 82 virtual void RemoveDiscoverySession(const base::Closure& callback,
80 MOCK_METHOD2(RemoveDiscoverySession, 83 const ErrorCallback& error_callback);
81 void(const base::Closure& callback,
82 const ErrorCallback& error_callback));
83 virtual ~MockBluetoothAdapter(); 84 virtual ~MockBluetoothAdapter();
84 85
85 MOCK_METHOD1(RemovePairingDelegateInternal, 86 MOCK_METHOD1(RemovePairingDelegateInternal,
86 void(BluetoothDevice::PairingDelegate* pairing_delegate)); 87 void(BluetoothDevice::PairingDelegate* pairing_delegate));
87 }; 88 };
88 89
89 } // namespace device 90 } // namespace device
90 91
91 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ 92 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_discovery_session.cc ('k') | device/bluetooth/test/mock_bluetooth_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698