summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authorjpawlowski <jpawlowski@chromium.org>2015-04-16 16:58:44 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-16 23:59:02 +0000
commitb51933daebb2453735df35a21519d7c4439c25fc (patch)
tree782b8874ea631830c6783857b7b480ffe732fcd5 /device
parent76302d920e57d6d0c368d827a78817aecea541ba (diff)
downloadchromium_src-b51933daebb2453735df35a21519d7c4439c25fc.zip
chromium_src-b51933daebb2453735df35a21519d7c4439c25fc.tar.gz
chromium_src-b51933daebb2453735df35a21519d7c4439c25fc.tar.bz2
Expose SetDiscoveryFilter from BluetoothEventRouter
This patch makes it possible to control BluetoothDiscoveryFilter assigned to discovery sessions through BluetoothEventRouter router. BUG=407773 R=armansito@chromium.org Review URL: https://codereview.chromium.org/1083163002 Cr-Commit-Position: refs/heads/master@{#325557}
Diffstat (limited to 'device')
-rw-r--r--device/bluetooth/test/mock_bluetooth_adapter.cc8
-rw-r--r--device/bluetooth/test/mock_bluetooth_adapter.h9
2 files changed, 17 insertions, 0 deletions
diff --git a/device/bluetooth/test/mock_bluetooth_adapter.cc b/device/bluetooth/test/mock_bluetooth_adapter.cc
index 1ee00ee..a021bfd 100644
--- a/device/bluetooth/test/mock_bluetooth_adapter.cc
+++ b/device/bluetooth/test/mock_bluetooth_adapter.cc
@@ -41,4 +41,12 @@ void MockBluetoothAdapter::SetDiscoveryFilter(
const ErrorCallback& error_callback) {
}
+void MockBluetoothAdapter::StartDiscoverySessionWithFilter(
+ scoped_ptr<BluetoothDiscoveryFilter> discovery_filter,
+ const DiscoverySessionCallback& callback,
+ const ErrorCallback& error_callback) {
+ StartDiscoverySessionWithFilterRaw(discovery_filter.get(), callback,
+ error_callback);
+}
+
} // namespace device
diff --git a/device/bluetooth/test/mock_bluetooth_adapter.h b/device/bluetooth/test/mock_bluetooth_adapter.h
index d338256..3abe858 100644
--- a/device/bluetooth/test/mock_bluetooth_adapter.h
+++ b/device/bluetooth/test/mock_bluetooth_adapter.h
@@ -61,6 +61,10 @@ class MockBluetoothAdapter : public BluetoothAdapter {
MOCK_METHOD2(StartDiscoverySession,
void(const DiscoverySessionCallback& callback,
const ErrorCallback& error_callback));
+ MOCK_METHOD3(StartDiscoverySessionWithFilterRaw,
+ void(const BluetoothDiscoveryFilter*,
+ const DiscoverySessionCallback& callback,
+ const ErrorCallback& error_callback));
MOCK_CONST_METHOD0(GetDevices, BluetoothAdapter::ConstDeviceList());
MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address));
MOCK_CONST_METHOD1(GetDevice,
@@ -86,6 +90,11 @@ class MockBluetoothAdapter : public BluetoothAdapter {
const AcquiredCallback& callback,
const BluetoothAudioSink::ErrorCallback& error_callback));
+ void StartDiscoverySessionWithFilter(
+ scoped_ptr<BluetoothDiscoveryFilter> discovery_filter,
+ const DiscoverySessionCallback& callback,
+ const ErrorCallback& error_callback);
+
protected:
void DeleteOnCorrectThread() const override;
void AddDiscoverySession(BluetoothDiscoveryFilter* discovery_filter,