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

* 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"

Co-authored-by: Charles Kerr <charles@charleskerr.com>

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

Co-authored-by: Charles Kerr <charles@charleskerr.com>

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

fix BUILD.gn linting

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-09-30 06:23:18 -05:00 committed by GitHub
parent 5836ea1a78
commit 4d16326b4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 3 deletions

View file

@ -15,11 +15,14 @@
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "electron/buildflags/buildflags.h"
#include "pdf/pdf_features.h"
#include "printing/backend/print_backend.h" // nogncheck
#include "printing/units.h"
#include "shell/common/thread_restrictions.h"
#if BUILDFLAG(ENABLE_PDF_VIEWER)
#include "pdf/pdf_features.h"
#endif
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
#endif