| 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 #ifndef COMPONENTS_ARC_TEST_FAKE_BLUETOOTH_INSTANCE_H_ | 5 #ifndef COMPONENTS_ARC_TEST_FAKE_BLUETOOTH_INSTANCE_H_ |
| 6 #define COMPONENTS_ARC_TEST_FAKE_BLUETOOTH_INSTANCE_H_ | 6 #define COMPONENTS_ARC_TEST_FAKE_BLUETOOTH_INSTANCE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <vector> | 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
| 12 #include "components/arc/common/bluetooth.mojom.h" | 13 #include "components/arc/common/bluetooth.mojom.h" |
| 13 #include "mojo/public/cpp/bindings/binding.h" | 14 #include "mojo/public/cpp/bindings/binding.h" |
| 14 | 15 |
| 15 namespace arc { | 16 namespace arc { |
| 16 | 17 |
| 17 class FakeBluetoothInstance : public mojom::BluetoothInstance { | 18 class FakeBluetoothInstance : public mojom::BluetoothInstance { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 int32_t attribute_handle, | 116 int32_t attribute_handle, |
| 116 int32_t offset, | 117 int32_t offset, |
| 117 mojo::Array<uint8_t> value, | 118 mojo::Array<uint8_t> value, |
| 118 const RequestGattWriteCallback& callback) override; | 119 const RequestGattWriteCallback& callback) override; |
| 119 | 120 |
| 120 const std::vector<mojo::Array<mojom::BluetoothPropertyPtr>>& | 121 const std::vector<mojo::Array<mojom::BluetoothPropertyPtr>>& |
| 121 device_found_data() const { | 122 device_found_data() const { |
| 122 return device_found_data_; | 123 return device_found_data_; |
| 123 } | 124 } |
| 124 | 125 |
| 125 const std::vector<LEDeviceFoundData*>& le_device_found_data() const { | 126 const std::vector<std::unique_ptr<LEDeviceFoundData>>& le_device_found_data() |
| 127 const { |
| 126 return le_device_found_data_; | 128 return le_device_found_data_; |
| 127 } | 129 } |
| 128 | 130 |
| 129 const std::vector<GattDBResult*>& gatt_db_result() const { | 131 const std::vector<std::unique_ptr<GattDBResult>>& gatt_db_result() const { |
| 130 return gatt_db_result_; | 132 return gatt_db_result_; |
| 131 } | 133 } |
| 132 | 134 |
| 133 private: | 135 private: |
| 134 std::vector<mojo::Array<mojom::BluetoothPropertyPtr>> device_found_data_; | 136 std::vector<mojo::Array<mojom::BluetoothPropertyPtr>> device_found_data_; |
| 135 std::vector<LEDeviceFoundData*> le_device_found_data_; | 137 std::vector<std::unique_ptr<LEDeviceFoundData>> le_device_found_data_; |
| 136 std::vector<GattDBResult*> gatt_db_result_; | 138 std::vector<std::unique_ptr<GattDBResult>> gatt_db_result_; |
| 137 | 139 |
| 138 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothInstance); | 140 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothInstance); |
| 139 }; | 141 }; |
| 140 | 142 |
| 141 } // namespace arc | 143 } // namespace arc |
| 142 | 144 |
| 143 #endif // COMPONENTS_ARC_TEST_FAKE_BLUETOOTH_INSTANCE_H_ | 145 #endif // COMPONENTS_ARC_TEST_FAKE_BLUETOOTH_INSTANCE_H_ |
| OLD | NEW |