--- chromecast/browser/cast_browser_main_parts.cc.orig 2022-04-21 18:48:31 UTC +++ chromecast/browser/cast_browser_main_parts.cc @@ -92,7 +92,7 @@ #include "ui/base/ui_base_switches.h" #include "ui/gl/gl_switches.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #include @@ -147,7 +147,7 @@ #include "extensions/browser/extension_prefs.h" // nogncheck #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) #include "chromecast/browser/exo/wayland_server_controller.h" #endif @@ -283,7 +283,7 @@ class CastViewsDelegate : public views::ViewsDelegate #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath GetApplicationFontsDir() { std::unique_ptr env(base::Environment::Create()); @@ -329,7 +329,7 @@ const DefaultCommandLineSwitch kDefaultSwitches[] = { {cc::switches::kDisableThreadedAnimation, ""}, #endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_CAST_AUDIO_ONLY) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(ARCH_CPU_X86_FAMILY) // This is needed for now to enable the x11 Ozone platform to work with // current Linux/NVidia OpenGL drivers. @@ -521,7 +521,7 @@ void CastBrowserMainParts::ToolkitInitialized() { views_delegate_ = std::make_unique(); #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath dir_font = GetApplicationFontsDir(); const FcChar8 *dir_font_char8 = reinterpret_cast(dir_font.value().data()); if (!FcConfigAppFontAddDir(gfx::GetGlobalFontConfig(), dir_font_char8)) { @@ -752,7 +752,7 @@ int CastBrowserMainParts::PreMainMessageLoopRun() { cast_browser_process_->browser_context()); #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) wayland_server_controller_ = std::make_unique(window_manager_.get()); #endif @@ -827,7 +827,7 @@ void CastBrowserMainParts::PostMainMessageLoopRun() { cast_browser_process_->cast_service()->Stop(); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) wayland_server_controller_.reset(); #endif #if BUILDFLAG(ENABLE_CHROMECAST_EXTENSIONS)