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

Unified Diff: components/arc/bluetooth/bluetooth_struct_traits.h

Issue 2394683007: Reland "components/arc: implement multi advertising" (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/arc/bluetooth/bluetooth_struct_traits.h
diff --git a/components/arc/bluetooth/bluetooth_struct_traits.h b/components/arc/bluetooth/bluetooth_struct_traits.h
index 80c1b920780e7e0e2d9ca351f4152b4aefe76234..26ca434aefc22ea0e659a2b698d334c50879e88a 100644
--- a/components/arc/bluetooth/bluetooth_struct_traits.h
+++ b/components/arc/bluetooth/bluetooth_struct_traits.h
@@ -6,7 +6,9 @@
#define COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_STRUCT_TRAITS_H_
#include "components/arc/common/bluetooth.mojom.h"
+#include "device/bluetooth/bluetooth_advertisement.h"
#include "device/bluetooth/bluetooth_common.h"
+#include "device/bluetooth/bluetooth_uuid.h"
#include "device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.h"
namespace mojo {
@@ -100,6 +102,33 @@ struct StructTraits<arc::mojom::BluetoothUUIDDataView, device::BluetoothUUID> {
device::BluetoothUUID* output);
};
+template <>
+struct StructTraits<arc::mojom::BluetoothAdvertisementDataView,
+ std::unique_ptr<device::BluetoothAdvertisement::Data>> {
+ static bool Read(
+ arc::mojom::BluetoothAdvertisementDataView advertisement,
+ std::unique_ptr<device::BluetoothAdvertisement::Data>* output);
+
+ // Dummy methods.
+ static arc::mojom::BluetoothAdvertisementType type(
+ std::unique_ptr<device::BluetoothAdvertisement::Data>& input) {
+ NOTREACHED();
+ return arc::mojom::BluetoothAdvertisementType::ADV_TYPE_NON_CONNECTABLE;
+ }
+
+ static bool include_tx_power(
+ std::unique_ptr<device::BluetoothAdvertisement::Data>& input) {
+ NOTREACHED();
+ return false;
+ }
+
+ static mojo::Array<arc::mojom::BluetoothAdvertisingDataPtr> data(
+ std::unique_ptr<device::BluetoothAdvertisement::Data>& input) {
+ NOTREACHED();
+ return mojo::Array<arc::mojom::BluetoothAdvertisingDataPtr>();
+ }
+};
+
} // namespace mojo
#endif // COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_STRUCT_TRAITS_H_

Powered by Google App Engine
This is Rietveld 408576698