diff --git a/BUILD.gn b/BUILD.gn index d0f301f1cb47..0b1f112e9e75 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -674,6 +674,8 @@ source_set("electron_lib") { if (enable_plugins) { sources += [ + "shell/browser/electron_plugin_info_host_impl.cc", + "shell/browser/electron_plugin_info_host_impl.h", "shell/common/plugin_info.cc", "shell/common/plugin_info.h", ] diff --git a/filenames.gni b/filenames.gni index aa1148d00a59..5bb446ae2d81 100644 --- a/filenames.gni +++ b/filenames.gni @@ -379,8 +379,6 @@ filenames = { "shell/browser/electron_navigation_throttle.h", "shell/browser/electron_permission_manager.cc", "shell/browser/electron_permission_manager.h", - "shell/browser/electron_plugin_info_host_impl.cc", - "shell/browser/electron_plugin_info_host_impl.h", "shell/browser/electron_speech_recognition_manager_delegate.cc", "shell/browser/electron_speech_recognition_manager_delegate.h", "shell/browser/electron_web_contents_utility_handler_impl.cc", diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index e657d0c8ff85..11fdc4e2f769 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1458,6 +1458,7 @@ void ElectronBrowserClient:: render_frame_host); }, &render_frame_host)); +#if BUILDFLAG(ENABLE_PLUGINS) associated_registry.AddInterface( 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( base::BindRepeating( diff --git a/shell/browser/printing/printing_utils.cc b/shell/browser/printing/printing_utils.cc index 14dc82a3245a..52534ee31fdb 100644 --- a/shell/browser/printing/printing_utils.cc +++ b/shell/browser/printing/printing_utils.cc @@ -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