|
15 | 15 | #include "base/task/thread_pool.h" |
16 | 16 | #include "build/branding_buildflags.h" |
17 | 17 | #include "build/build_config.h" |
| 18 | +#include "build/lightweight_buildflags.h" |
18 | 19 | #include "cc/base/switches.h" |
19 | 20 | #include "components/language_detection/content/common/language_detection.mojom.h" |
20 | 21 | #include "components/optimization_guide/public/mojom/model_broker.mojom.h" |
|
23 | 24 | #include "content/browser/attribution_reporting/attribution_internals_ui.h" |
24 | 25 | #include "content/browser/background_fetch/background_fetch_service_impl.h" |
25 | 26 | #include "content/browser/bad_message.h" |
| 27 | +#if !BUILDFLAG(DISABLE_BLUETOOTH) |
26 | 28 | #include "content/browser/bluetooth/web_bluetooth_service_impl.h" |
| 29 | +#endif |
27 | 30 | #include "content/browser/browser_context_impl.h" |
28 | 31 | #include "content/browser/browser_main_loop.h" |
29 | 32 | #include "content/browser/browsing_topics/browsing_topics_document_host.h" |
|
137 | 140 | #include "third_party/blink/public/mojom/background_sync/background_sync.mojom.h" |
138 | 141 | #include "third_party/blink/public/mojom/blob/blob_url_store.mojom.h" |
139 | 142 | #include "third_party/blink/public/mojom/blob/file_backed_blob_factory.mojom.h" |
| 143 | +#if !BUILDFLAG(DISABLE_BLUETOOTH) |
140 | 144 | #include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h" |
| 145 | +#endif |
141 | 146 | #include "third_party/blink/public/mojom/buckets/bucket_manager_host.mojom.h" |
142 | 147 | #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h" |
143 | 148 | #include "third_party/blink/public/mojom/choosers/color_chooser.mojom.h" |
|
181 | 186 | #include "third_party/blink/public/mojom/push_messaging/push_messaging.mojom.h" |
182 | 187 | #include "third_party/blink/public/mojom/quota/quota_manager_host.mojom.h" |
183 | 188 | #include "third_party/blink/public/mojom/sensor/web_sensor_provider.mojom.h" |
| 189 | +// Serial depends on Bluetooth |
| 190 | +#if !BUILDFLAG(DISABLE_BLUETOOTH) |
184 | 191 | #include "third_party/blink/public/mojom/serial/serial.mojom.h" |
| 192 | +#endif |
185 | 193 | #include "third_party/blink/public/mojom/sms/webotp_service.mojom.h" |
186 | 194 | #include "third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom.h" |
187 | 195 | #include "third_party/blink/public/mojom/speech/speech_synthesis.mojom.h" |
@@ -941,8 +949,10 @@ void PopulateFrameBinders(RenderFrameHostImpl* host, mojo::BinderMap* map) { |
941 | 949 | &BindWebNNContextProviderForRenderFrame, base::Unretained(host))); |
942 | 950 | } |
943 | 951 |
|
| 952 | +#if !BUILDFLAG(DISABLE_BLUETOOTH) |
944 | 953 | map->Add<blink::mojom::WebBluetoothService>(base::BindRepeating( |
945 | 954 | &WebBluetoothServiceImpl::BindIfAllowed, base::Unretained(host))); |
| 955 | +#endif |
946 | 956 |
|
947 | 957 | map->Add<blink::mojom::PushMessaging>(base::BindRepeating( |
948 | 958 | &RenderFrameHostImpl::GetPushMessaging, base::Unretained(host))); |
@@ -1099,8 +1109,11 @@ void PopulateFrameBinders(RenderFrameHostImpl* host, mojo::BinderMap* map) { |
1099 | 1109 | base::Unretained(host))); |
1100 | 1110 | #endif // BUILDFLAG(IS_ANDROID) |
1101 | 1111 |
|
| 1112 | +// Serial depends on Bluetooth |
| 1113 | +#if !BUILDFLAG(DISABLE_BLUETOOTH) |
1102 | 1114 | map->Add<blink::mojom::SerialService>(base::BindRepeating( |
1103 | 1115 | &RenderFrameHostImpl::BindSerialService, base::Unretained(host))); |
| 1116 | +#endif |
1104 | 1117 |
|
1105 | 1118 | #if BUILDFLAG(IS_CHROMEOS) |
1106 | 1119 | map->Add<blink::mojom::SmartCardService>(base::BindRepeating( |
@@ -1395,8 +1408,11 @@ void PopulateDedicatedWorkerBinders(DedicatedWorkerHost* host, |
1395 | 1408 | base::Unretained(host))); |
1396 | 1409 | map->Add<blink::mojom::ReportingServiceProxy>(base::BindRepeating( |
1397 | 1410 | &CreateReportingServiceProxyForDedicatedWorker, base::Unretained(host))); |
| 1411 | +// Serial depends on Bluetooth |
| 1412 | +#if !BUILDFLAG(DISABLE_BLUETOOTH) |
1398 | 1413 | map->Add<blink::mojom::SerialService>(base::BindRepeating( |
1399 | 1414 | &DedicatedWorkerHost::BindSerialService, base::Unretained(host))); |
| 1415 | +#endif |
1400 | 1416 | #if !BUILDFLAG(IS_ANDROID) |
1401 | 1417 | map->Add<blink::mojom::HidService>(base::BindRepeating( |
1402 | 1418 | &DedicatedWorkerHost::BindHidService, base::Unretained(host))); |
|
0 commit comments