Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: device/bluetooth/test/fake_bluetooth.cc

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/bluetooth/test/fake_bluetooth.h ('k') | device/gamepad/gamepad_monitor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/test/fake_bluetooth.h" 5 #include "device/bluetooth/test/fake_bluetooth.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "device/bluetooth/bluetooth_adapter_factory.h" 10 #include "device/bluetooth/bluetooth_adapter_factory.h"
11 #include "device/bluetooth/public/interfaces/test/fake_bluetooth.mojom.h" 11 #include "device/bluetooth/public/interfaces/test/fake_bluetooth.mojom.h"
12 #include "mojo/public/cpp/bindings/strong_binding.h" 12 #include "mojo/public/cpp/bindings/strong_binding.h"
13 13
14 namespace bluetooth { 14 namespace bluetooth {
15 15
16 using device::BluetoothAdapterFactory; 16 using device::BluetoothAdapterFactory;
17 17
18 FakeBluetooth::FakeBluetooth() 18 FakeBluetooth::FakeBluetooth()
19 : global_factory_values_( 19 : global_factory_values_(
20 BluetoothAdapterFactory::Get().InitGlobalValuesForTesting()) {} 20 BluetoothAdapterFactory::Get().InitGlobalValuesForTesting()) {}
21 FakeBluetooth::~FakeBluetooth() {} 21 FakeBluetooth::~FakeBluetooth() {}
22 22
23 // static 23 // static
24 void FakeBluetooth::Create(mojom::FakeBluetoothRequest request) { 24 void FakeBluetooth::Create(const service_manager::BindSourceInfo& source_info,
25 mojom::FakeBluetoothRequest request) {
25 mojo::MakeStrongBinding(base::MakeUnique<FakeBluetooth>(), 26 mojo::MakeStrongBinding(base::MakeUnique<FakeBluetooth>(),
26 std::move(request)); 27 std::move(request));
27 } 28 }
28 29
29 void FakeBluetooth::SetLESupported(bool supported, 30 void FakeBluetooth::SetLESupported(bool supported,
30 const SetLESupportedCallback& callback) { 31 const SetLESupportedCallback& callback) {
31 global_factory_values_->SetLESupported(supported); 32 global_factory_values_->SetLESupported(supported);
32 callback.Run(); 33 callback.Run();
33 } 34 }
34 35
35 } // namespace bluetooth 36 } // namespace bluetooth
OLDNEW
« no previous file with comments | « device/bluetooth/test/fake_bluetooth.h ('k') | device/gamepad/gamepad_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698