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

Unified Diff: content/renderer/bluetooth/bluetooth_type_converters.cc

Issue 2510323002: bluetooth: Implement acceptAllDevices (Closed)
Patch Set: Fix mac Created 4 years, 1 month 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: content/renderer/bluetooth/bluetooth_type_converters.cc
diff --git a/content/renderer/bluetooth/bluetooth_type_converters.cc b/content/renderer/bluetooth/bluetooth_type_converters.cc
index c7bf1a7948979c4a696ddd358ccc2879c247d3ac..5782b1dc67e50407adba6f5cecb0cb32ea038f7b 100644
--- a/content/renderer/bluetooth/bluetooth_type_converters.cc
+++ b/content/renderer/bluetooth/bluetooth_type_converters.cc
@@ -37,8 +37,13 @@ TypeConverter<blink::mojom::WebBluetoothRequestDeviceOptionsPtr,
blink::mojom::WebBluetoothRequestDeviceOptionsPtr options =
blink::mojom::WebBluetoothRequestDeviceOptions::New();
- options->filters = mojo::Array<blink::mojom::WebBluetoothScanFilterPtr>::From(
- web_options.filters);
+ options->accept_all_devices = web_options.acceptAllDevices;
+
+ if (web_options.hasFilters) {
+ options->filters =
+ mojo::Array<blink::mojom::WebBluetoothScanFilterPtr>::From(
+ web_options.filters);
+ }
options->optional_services =
mojo::Array<base::Optional<device::BluetoothUUID>>::From(
web_options.optionalServices);

Powered by Google App Engine
This is Rietveld 408576698