Chromium Code Reviews| Index: components/arc/bluetooth/bluetooth_type_converters.h |
| diff --git a/components/arc/bluetooth/bluetooth_type_converters.h b/components/arc/bluetooth/bluetooth_type_converters.h |
| index 5c282dae78b523e4538f03f2f11d93b259c444e0..446770f142b3f2249c0c41a9b208e648dfa394d3 100644 |
| --- a/components/arc/bluetooth/bluetooth_type_converters.h |
| +++ b/components/arc/bluetooth/bluetooth_type_converters.h |
| @@ -11,6 +11,7 @@ |
| #include <utility> |
| #include "components/arc/common/bluetooth.mojom.h" |
| +#include "device/bluetooth/bluetooth_advertisement.h" |
| #include "device/bluetooth/bluetooth_gatt_service.h" |
| #include "mojo/public/cpp/bindings/type_converter.h" |
|
rickyz (no longer on Chrome)
2016/08/24 21:47:30
I think the recommendation is to use type mapping
Eric Caruso
2016/08/24 22:24:42
Type mapping forces me to write the chrome->mojo c
rickyz (no longer on Chrome)
2016/08/29 01:09:23
I chatted with dcheng@, who asked one of the mojo
Eric Caruso
2016/08/29 17:24:52
I did actually look into this before and it gave m
|
| @@ -49,6 +50,20 @@ struct TypeConverter<arc::mojom::BluetoothGattStatus, |
| const device::BluetoothGattService::GattErrorCode& error_code); |
| }; |
| +template <> |
| +struct TypeConverter<device::BluetoothAdvertisement::AdvertisementType, |
| + arc::mojom::BluetoothAdvertisementType> { |
| + static device::BluetoothAdvertisement::AdvertisementType Convert( |
| + const arc::mojom::BluetoothAdvertisementType& type); |
| +}; |
| + |
| +template <> |
| +struct TypeConverter<std::unique_ptr<device::BluetoothAdvertisement::Data>, |
| + arc::mojom::BluetoothAdvertisementPtr> { |
| + static std::unique_ptr<device::BluetoothAdvertisement::Data> Convert( |
| + const arc::mojom::BluetoothAdvertisementPtr& advertisement); |
| +}; |
| + |
| } // namespace mojo |
| #endif // COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_TYPE_CONVERTERS_H_ |