OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "device/bluetooth/dbus/fake_bluetooth_media_transport_client.h" | 5 #include "device/bluetooth/dbus/fake_bluetooth_media_transport_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <sys/socket.h> | 8 #include <sys/socket.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 #include <sstream> | 12 #include <sstream> |
13 | 13 |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
17 #include "dbus/file_descriptor.h" | |
18 #include "device/bluetooth/dbus/bluetooth_media_client.h" | 17 #include "device/bluetooth/dbus/bluetooth_media_client.h" |
19 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 18 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
20 #include "device/bluetooth/dbus/fake_bluetooth_adapter_client.h" | 19 #include "device/bluetooth/dbus/fake_bluetooth_adapter_client.h" |
21 #include "device/bluetooth/dbus/fake_bluetooth_media_client.h" | 20 #include "device/bluetooth/dbus/fake_bluetooth_media_client.h" |
22 #include "device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h
" | 21 #include "device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h
" |
23 | 22 |
24 using dbus::ObjectPath; | 23 using dbus::ObjectPath; |
25 | 24 |
26 namespace { | 25 namespace { |
27 | 26 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 } | 321 } |
323 DCHECK((fds[0] > kInvalidFd) && (fds[1] > kInvalidFd)); | 322 DCHECK((fds[0] > kInvalidFd) && (fds[1] > kInvalidFd)); |
324 transport->input_fd.reset(new base::File(fds[0])); | 323 transport->input_fd.reset(new base::File(fds[0])); |
325 | 324 |
326 base::ScopedFD out_fd(fds[1]); | 325 base::ScopedFD out_fd(fds[1]); |
327 callback.Run(std::move(out_fd), kDefaultReadMtu, kDefaultWriteMtu); | 326 callback.Run(std::move(out_fd), kDefaultReadMtu, kDefaultWriteMtu); |
328 SetState(endpoint_path, "active"); | 327 SetState(endpoint_path, "active"); |
329 } | 328 } |
330 | 329 |
331 } // namespace bluez | 330 } // namespace bluez |
OLD | NEW |