| OLD | NEW |
| 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/bluetooth_adapter_factory.h" | 8 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 9 #include "device/bluetooth/public/interfaces/test/fake_bluetooth.mojom.h" | 9 #include "device/bluetooth/public/interfaces/test/fake_bluetooth.mojom.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| 11 | 11 |
| 12 namespace service_manager { |
| 13 struct BindSourceInfo; |
| 14 } |
| 15 |
| 12 namespace bluetooth { | 16 namespace bluetooth { |
| 13 | 17 |
| 14 // Implementation of FakeBluetooth in | 18 // Implementation of FakeBluetooth in |
| 15 // src/device/bluetooth/public/interfaces/test/fake_bluetooth.mojom. | 19 // src/device/bluetooth/public/interfaces/test/fake_bluetooth.mojom. |
| 16 // Implemented on top of the C++ device/bluetooth API. | 20 // Implemented on top of the C++ device/bluetooth API. |
| 17 class FakeBluetooth : NON_EXPORTED_BASE(public mojom::FakeBluetooth) { | 21 class FakeBluetooth : NON_EXPORTED_BASE(public mojom::FakeBluetooth) { |
| 18 public: | 22 public: |
| 19 FakeBluetooth(); | 23 FakeBluetooth(); |
| 20 ~FakeBluetooth() override; | 24 ~FakeBluetooth() override; |
| 21 | 25 |
| 22 static void Create(mojom::FakeBluetoothRequest request); | 26 static void Create(const service_manager::BindSourceInfo& source_info, |
| 27 mojom::FakeBluetoothRequest request); |
| 23 | 28 |
| 24 void SetLESupported(bool available, | 29 void SetLESupported(bool available, |
| 25 const SetLESupportedCallback& callback) override; | 30 const SetLESupportedCallback& callback) override; |
| 26 | 31 |
| 27 private: | 32 private: |
| 28 std::unique_ptr<device::BluetoothAdapterFactory::GlobalValuesForTesting> | 33 std::unique_ptr<device::BluetoothAdapterFactory::GlobalValuesForTesting> |
| 29 global_factory_values_; | 34 global_factory_values_; |
| 30 }; | 35 }; |
| 31 | 36 |
| 32 } // namespace bluetooth | 37 } // namespace bluetooth |
| 33 | 38 |
| 34 #endif // DEVICE_BLUETOOTH_TEST_FAKE_BLUETOOTH_H_ | 39 #endif // DEVICE_BLUETOOTH_TEST_FAKE_BLUETOOTH_H_ |
| OLD | NEW |