OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "device/bluetooth/adapter.h" | 8 #include "device/bluetooth/adapter.h" |
9 #include "device/bluetooth/adapter_factory.h" | 9 #include "device/bluetooth/adapter_factory.h" |
10 #include "device/bluetooth/bluetooth_adapter_factory.h" | 10 #include "device/bluetooth/bluetooth_adapter_factory.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 } else { | 29 } else { |
30 callback.Run(nullptr /* AdapterPtr */); | 30 callback.Run(nullptr /* AdapterPtr */); |
31 } | 31 } |
32 } | 32 } |
33 | 33 |
34 void AdapterFactory::OnGetAdapter( | 34 void AdapterFactory::OnGetAdapter( |
35 const GetAdapterCallback& callback, | 35 const GetAdapterCallback& callback, |
36 scoped_refptr<device::BluetoothAdapter> adapter) { | 36 scoped_refptr<device::BluetoothAdapter> adapter) { |
37 mojom::AdapterPtr adapter_ptr; | 37 mojom::AdapterPtr adapter_ptr; |
38 mojo::MakeStrongBinding(base::MakeUnique<Adapter>(adapter), | 38 mojo::MakeStrongBinding(base::MakeUnique<Adapter>(adapter), |
39 mojo::GetProxy(&adapter_ptr)); | 39 mojo::MakeRequest(&adapter_ptr)); |
40 callback.Run(std::move(adapter_ptr)); | 40 callback.Run(std::move(adapter_ptr)); |
41 } | 41 } |
42 | 42 |
43 } // namespace bluetooth | 43 } // namespace bluetooth |
OLD | NEW |