summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus
diff options
context:
space:
mode:
authormcchou <mcchou@chromium.org>2015-03-26 14:36:44 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-26 21:37:30 +0000
commitad8553a80203d8be31fc1cd60a4291883bcb3849 (patch)
tree4397778e08c9038c6a32f83463f3ba4d0c049790 /chromeos/dbus
parentb53749fec68b4f2f9daacef9cbbe75e2f58f7805 (diff)
downloadchromium_src-ad8553a80203d8be31fc1cd60a4291883bcb3849.zip
chromium_src-ad8553a80203d8be31fc1cd60a4291883bcb3849.tar.gz
chromium_src-ad8553a80203d8be31fc1cd60a4291883bcb3849.tar.bz2
device/bluetooth: Add read_mtu as an argument of BluetoothAudioSinkDataAvailable.
This CL added read_mtu into the signature of BluetoothAudioSink::Observer::BluetoothAudioSinkDataAvailable and modified corresponding tests. BUG=441581 TEST=device_unittests --gtest_filter=*AudioSink* Review URL: https://codereview.chromium.org/1034893002 Cr-Commit-Position: refs/heads/master@{#322476}
Diffstat (limited to 'chromeos/dbus')
-rw-r--r--chromeos/dbus/fake_bluetooth_media_transport_client.cc6
-rw-r--r--chromeos/dbus/fake_bluetooth_media_transport_client.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/chromeos/dbus/fake_bluetooth_media_transport_client.cc b/chromeos/dbus/fake_bluetooth_media_transport_client.cc
index 93ee315..441a66b 100644
--- a/chromeos/dbus/fake_bluetooth_media_transport_client.cc
+++ b/chromeos/dbus/fake_bluetooth_media_transport_client.cc
@@ -30,8 +30,6 @@ const char kFailed[] = "org.bluez.Failed";
const char kNotAvailable[] = "org.bluez.NotAvailable";
const int kInvalidFd = -1;
-const uint16_t kReadMtu = 20;
-const uint16_t kWriteMtu = 25;
ObjectPath GenerateTransportPath() {
static unsigned int sequence_number = 0;
@@ -56,6 +54,8 @@ const std::vector<uint8_t>
0x21, 0x15, 0x33, 0x2C};
const uint16_t FakeBluetoothMediaTransportClient::kTransportDelay = 5;
const uint16_t FakeBluetoothMediaTransportClient::kTransportVolume = 50;
+const uint16_t FakeBluetoothMediaTransportClient::kDefaultReadMtu = 20;
+const uint16_t FakeBluetoothMediaTransportClient::kDefaultWriteMtu = 25;
FakeBluetoothMediaTransportClient::Properties::Properties(
const PropertyChangedCallback& callback)
@@ -319,7 +319,7 @@ void FakeBluetoothMediaTransportClient::AcquireInternal(
transport->input_fd.reset(new base::File(fds[0]));
dbus::FileDescriptor out_fd(fds[1]);
- callback.Run(&out_fd, kReadMtu, kWriteMtu);
+ callback.Run(&out_fd, kDefaultReadMtu, kDefaultWriteMtu);
SetState(endpoint_path, "active");
}
diff --git a/chromeos/dbus/fake_bluetooth_media_transport_client.h b/chromeos/dbus/fake_bluetooth_media_transport_client.h
index eebbea8..997d28d 100644
--- a/chromeos/dbus/fake_bluetooth_media_transport_client.h
+++ b/chromeos/dbus/fake_bluetooth_media_transport_client.h
@@ -45,6 +45,10 @@ class CHROMEOS_EXPORT FakeBluetoothMediaTransportClient
static const uint16_t kTransportDelay;
static const uint16_t kTransportVolume;
+ // The default MTUs for read and write.
+ static const uint16_t kDefaultReadMtu;
+ static const uint16_t kDefaultWriteMtu;
+
FakeBluetoothMediaTransportClient();
~FakeBluetoothMediaTransportClient() override;