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 "content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_s
etter_impl.h" | 5 #include "content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_s
etter_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "content/public/test/layouttest_support.h" | 10 #include "content/public/test/layouttest_support.h" |
11 #include "content/shell/browser/layout_test/layout_test_bluetooth_adapter_provid
er.h" | 11 #include "content/shell/browser/layout_test/layout_test_bluetooth_adapter_provid
er.h" |
12 #include "device/bluetooth/bluetooth_adapter_factory_wrapper.h" | 12 #include "device/bluetooth/bluetooth_adapter_factory_wrapper.h" |
13 #include "mojo/public/cpp/bindings/strong_binding.h" | 13 #include "mojo/public/cpp/bindings/strong_binding.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 LayoutTestBluetoothFakeAdapterSetterImpl:: | 17 LayoutTestBluetoothFakeAdapterSetterImpl:: |
18 LayoutTestBluetoothFakeAdapterSetterImpl() {} | 18 LayoutTestBluetoothFakeAdapterSetterImpl() {} |
19 | 19 |
20 LayoutTestBluetoothFakeAdapterSetterImpl:: | 20 LayoutTestBluetoothFakeAdapterSetterImpl:: |
21 ~LayoutTestBluetoothFakeAdapterSetterImpl() {} | 21 ~LayoutTestBluetoothFakeAdapterSetterImpl() {} |
22 | 22 |
23 // static | 23 // static |
24 void LayoutTestBluetoothFakeAdapterSetterImpl::Create( | 24 void LayoutTestBluetoothFakeAdapterSetterImpl::Create( |
| 25 const service_manager::BindSourceInfo& source_info, |
25 mojom::LayoutTestBluetoothFakeAdapterSetterRequest request) { | 26 mojom::LayoutTestBluetoothFakeAdapterSetterRequest request) { |
26 mojo::MakeStrongBinding( | 27 mojo::MakeStrongBinding( |
27 base::MakeUnique<LayoutTestBluetoothFakeAdapterSetterImpl>(), | 28 base::MakeUnique<LayoutTestBluetoothFakeAdapterSetterImpl>(), |
28 std::move(request)); | 29 std::move(request)); |
29 } | 30 } |
30 | 31 |
31 void LayoutTestBluetoothFakeAdapterSetterImpl::Set( | 32 void LayoutTestBluetoothFakeAdapterSetterImpl::Set( |
32 const std::string& adapter_name, | 33 const std::string& adapter_name, |
33 const SetCallback& callback) { | 34 const SetCallback& callback) { |
34 SetTestBluetoothScanDuration(); | 35 SetTestBluetoothScanDuration(); |
35 | 36 |
36 device::BluetoothAdapterFactoryWrapper::Get().SetBluetoothAdapterForTesting( | 37 device::BluetoothAdapterFactoryWrapper::Get().SetBluetoothAdapterForTesting( |
37 LayoutTestBluetoothAdapterProvider::GetBluetoothAdapter(adapter_name)); | 38 LayoutTestBluetoothAdapterProvider::GetBluetoothAdapter(adapter_name)); |
38 | 39 |
39 callback.Run(); | 40 callback.Run(); |
40 } | 41 } |
41 | 42 |
42 } // namespace content | 43 } // namespace content |
OLD | NEW |