fix: FTBFS when building with enable_plugins = false (#44003)

* fix: do not build electron_plugin_info_host_impl.cc when plugins are disabled

it fails to build from source with this error:

../../content/public/browser/plugin_service.h:17:2: error: "Plugins should be enabled"
   17 | #error "Plugins should be enabled"

* fix: FTBFS in printing_utils.cc when ENABLE_PDF is false

* fixup! fix: do not build electron_plugin_info_host_impl.cc when plugins are disabled

fix BUILD.gn linting
This commit is contained in:
Charles Kerr 2024-09-29 17:10:34 -05:00 committed by GitHub
parent 27d2a8f9e2
commit eb40d2cbfa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 3 deletions

View file

@ -1458,6 +1458,7 @@ void ElectronBrowserClient::
render_frame_host);
},
&render_frame_host));
#if BUILDFLAG(ENABLE_PLUGINS)
associated_registry.AddInterface<mojom::ElectronPluginInfoHost>(
base::BindRepeating(
[](content::RenderFrameHost* render_frame_host,
@ -1468,6 +1469,7 @@ void ElectronBrowserClient::
std::move(receiver));
},
&render_frame_host));
#endif
#if BUILDFLAG(ENABLE_PRINTING)
associated_registry.AddInterface<printing::mojom::PrintManagerHost>(
base::BindRepeating(