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

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

Issue 2815793003: bluetooth: Introduce SetLowEnergyAvailableForTesting (Closed)
Patch Set: Created 3 years, 8 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
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/public/interfaces/test/fake_bluetooth.mojom.h" 11 #include "device/bluetooth/public/interfaces/test/fake_bluetooth.mojom.h"
11 #include "mojo/public/cpp/bindings/strong_binding.h" 12 #include "mojo/public/cpp/bindings/strong_binding.h"
12 13
13 namespace bluetooth { 14 namespace bluetooth {
14 15
15 FakeBluetooth::FakeBluetooth() {} 16 FakeBluetooth::FakeBluetooth() {}
16 FakeBluetooth::~FakeBluetooth() {} 17 FakeBluetooth::~FakeBluetooth() {}
17 18
18 // static 19 // static
19 void FakeBluetooth::Create(mojom::FakeBluetoothRequest request) { 20 void FakeBluetooth::Create(mojom::FakeBluetoothRequest request) {
20 mojo::MakeStrongBinding(base::MakeUnique<FakeBluetooth>(), 21 mojo::MakeStrongBinding(base::MakeUnique<FakeBluetooth>(),
21 std::move(request)); 22 std::move(request));
22 } 23 }
23 24
24 void FakeBluetooth::SetLEAvailability( 25 void FakeBluetooth::SetLEAvailability(
25 bool available, 26 bool available,
26 const SetLEAvailabilityCallback& callback) { 27 const SetLEAvailabilityCallback& callback) {
27 // TODO(crbug.com/569709): Actually implement this method. 28 device::BluetoothAdapterFactory::Get().SetLowEnergyAvailableForTesting(
29 available);
28 callback.Run(); 30 callback.Run();
29 } 31 }
30 32
31 } // namespace bluetooth 33 } // namespace bluetooth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698