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

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

Issue 1083163002: Expose SetDiscoveryFilter from BluetoothEventRouter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another windows build fix Created 5 years, 8 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
« no previous file with comments | « no previous file | device/bluetooth/test/mock_bluetooth_adapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const ErrorCallback& error_callback)); 54 const ErrorCallback& error_callback));
55 MOCK_CONST_METHOD0(IsDiscoverable, bool()); 55 MOCK_CONST_METHOD0(IsDiscoverable, bool());
56 MOCK_METHOD3(SetDiscoverable, 56 MOCK_METHOD3(SetDiscoverable,
57 void(bool discoverable, 57 void(bool discoverable,
58 const base::Closure& callback, 58 const base::Closure& callback,
59 const ErrorCallback& error_callback)); 59 const ErrorCallback& error_callback));
60 MOCK_CONST_METHOD0(IsDiscovering, bool()); 60 MOCK_CONST_METHOD0(IsDiscovering, bool());
61 MOCK_METHOD2(StartDiscoverySession, 61 MOCK_METHOD2(StartDiscoverySession,
62 void(const DiscoverySessionCallback& callback, 62 void(const DiscoverySessionCallback& callback,
63 const ErrorCallback& error_callback)); 63 const ErrorCallback& error_callback));
64 MOCK_METHOD3(StartDiscoverySessionWithFilterRaw,
65 void(const BluetoothDiscoveryFilter*,
66 const DiscoverySessionCallback& callback,
67 const ErrorCallback& error_callback));
64 MOCK_CONST_METHOD0(GetDevices, BluetoothAdapter::ConstDeviceList()); 68 MOCK_CONST_METHOD0(GetDevices, BluetoothAdapter::ConstDeviceList());
65 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address)); 69 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address));
66 MOCK_CONST_METHOD1(GetDevice, 70 MOCK_CONST_METHOD1(GetDevice,
67 const BluetoothDevice*(const std::string& address)); 71 const BluetoothDevice*(const std::string& address));
68 MOCK_METHOD2(AddPairingDelegate, 72 MOCK_METHOD2(AddPairingDelegate,
69 void(BluetoothDevice::PairingDelegate* pairing_delegate, 73 void(BluetoothDevice::PairingDelegate* pairing_delegate,
70 enum PairingDelegatePriority priority)); 74 enum PairingDelegatePriority priority));
71 MOCK_METHOD1(RemovePairingDelegate, 75 MOCK_METHOD1(RemovePairingDelegate,
72 void(BluetoothDevice::PairingDelegate* pairing_delegate)); 76 void(BluetoothDevice::PairingDelegate* pairing_delegate));
73 MOCK_METHOD0(DefaultPairingDelegate, BluetoothDevice::PairingDelegate*()); 77 MOCK_METHOD0(DefaultPairingDelegate, BluetoothDevice::PairingDelegate*());
74 MOCK_METHOD4(CreateRfcommService, 78 MOCK_METHOD4(CreateRfcommService,
75 void(const BluetoothUUID& uuid, 79 void(const BluetoothUUID& uuid,
76 const ServiceOptions& options, 80 const ServiceOptions& options,
77 const CreateServiceCallback& callback, 81 const CreateServiceCallback& callback,
78 const CreateServiceErrorCallback& error_callback)); 82 const CreateServiceErrorCallback& error_callback));
79 MOCK_METHOD4(CreateL2capService, 83 MOCK_METHOD4(CreateL2capService,
80 void(const BluetoothUUID& uuid, 84 void(const BluetoothUUID& uuid,
81 const ServiceOptions& options, 85 const ServiceOptions& options,
82 const CreateServiceCallback& callback, 86 const CreateServiceCallback& callback,
83 const CreateServiceErrorCallback& error_callback)); 87 const CreateServiceErrorCallback& error_callback));
84 MOCK_METHOD3(RegisterAudioSink, 88 MOCK_METHOD3(RegisterAudioSink,
85 void(const BluetoothAudioSink::Options& options, 89 void(const BluetoothAudioSink::Options& options,
86 const AcquiredCallback& callback, 90 const AcquiredCallback& callback,
87 const BluetoothAudioSink::ErrorCallback& error_callback)); 91 const BluetoothAudioSink::ErrorCallback& error_callback));
88 92
93 void StartDiscoverySessionWithFilter(
94 scoped_ptr<BluetoothDiscoveryFilter> discovery_filter,
95 const DiscoverySessionCallback& callback,
96 const ErrorCallback& error_callback);
97
89 protected: 98 protected:
90 void DeleteOnCorrectThread() const override; 99 void DeleteOnCorrectThread() const override;
91 void AddDiscoverySession(BluetoothDiscoveryFilter* discovery_filter, 100 void AddDiscoverySession(BluetoothDiscoveryFilter* discovery_filter,
92 const base::Closure& callback, 101 const base::Closure& callback,
93 const ErrorCallback& error_callback) override; 102 const ErrorCallback& error_callback) override;
94 void RemoveDiscoverySession(BluetoothDiscoveryFilter* discovery_filter, 103 void RemoveDiscoverySession(BluetoothDiscoveryFilter* discovery_filter,
95 const base::Closure& callback, 104 const base::Closure& callback,
96 const ErrorCallback& error_callback) override; 105 const ErrorCallback& error_callback) override;
97 void SetDiscoveryFilter(scoped_ptr<BluetoothDiscoveryFilter> discovery_filter, 106 void SetDiscoveryFilter(scoped_ptr<BluetoothDiscoveryFilter> discovery_filter,
98 const base::Closure& callback, 107 const base::Closure& callback,
99 const ErrorCallback& error_callback) override; 108 const ErrorCallback& error_callback) override;
100 virtual ~MockBluetoothAdapter(); 109 virtual ~MockBluetoothAdapter();
101 110
102 MOCK_METHOD1(RemovePairingDelegateInternal, 111 MOCK_METHOD1(RemovePairingDelegateInternal,
103 void(BluetoothDevice::PairingDelegate* pairing_delegate)); 112 void(BluetoothDevice::PairingDelegate* pairing_delegate));
104 }; 113 };
105 114
106 } // namespace device 115 } // namespace device
107 116
108 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ 117 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/test/mock_bluetooth_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698