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

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

Issue 2853433002: bluetooth: Implement simulateCentral (Closed)
Patch Set: even moar cleanup 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
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 #ifndef DEVICE_BLUETOOTH_TEST_FAKE_BLUETOOTH_H_ 4 #ifndef DEVICE_BLUETOOTH_TEST_FAKE_BLUETOOTH_H_
5 #define DEVICE_BLUETOOTH_TEST_FAKE_BLUETOOTH_H_ 5 #define DEVICE_BLUETOOTH_TEST_FAKE_BLUETOOTH_H_
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "device/bluetooth/public/interfaces/test/fake_bluetooth.mojom.h" 8 #include "device/bluetooth/public/interfaces/test/fake_bluetooth.mojom.h"
9 #include "mojo/public/cpp/bindings/binding.h" 9 #include "device/bluetooth/test/fake_le_central_observer_manager.h"
10 10
11 namespace bluetooth { 11 namespace bluetooth {
12 12
13 // Implementation of FakeBluetooth in 13 // Implementation of FakeBluetooth in
14 // src/device/bluetooth/public/interfaces/test/fake_bluetooth.mojom. 14 // src/device/bluetooth/public/interfaces/test/fake_bluetooth.mojom.
15 // Implemented on top of the C++ device/bluetooth API. 15 // Implemented on top of the C++ device/bluetooth API, mainly
16 // device/bluetooth/bluetooth_adapter_factory.h.
16 class FakeBluetooth : NON_EXPORTED_BASE(public mojom::FakeBluetooth) { 17 class FakeBluetooth : NON_EXPORTED_BASE(public mojom::FakeBluetooth) {
17 public: 18 public:
18 FakeBluetooth(); 19 FakeBluetooth();
19 ~FakeBluetooth() override; 20 ~FakeBluetooth() override;
20 21
21 static void Create(mojom::FakeBluetoothRequest request); 22 static void Create(mojom::FakeBluetoothRequest request);
22 23
23 void SetLESupported(bool available, 24 void SetLESupported(bool available,
24 const SetLESupportedCallback& callback) override; 25 const SetLESupportedCallback& callback) override;
26 void SimulateLECentralObserverManager(
27 mojom::LECentralObserverManagerState state,
28 const SimulateLECentralObserverManagerCallback& callback) override;
29
30 private:
31 scoped_refptr<FakeLECentralObserverManager> fake_manager_;
25 }; 32 };
26 33
27 } // namespace bluetooth 34 } // namespace bluetooth
28 35
29 #endif // DEVICE_BLUETOOTH_TEST_FAKE_BLUETOOTH_H_ 36 #endif // DEVICE_BLUETOOTH_TEST_FAKE_BLUETOOTH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698