1 --- chrome/browser/ui/views/frame/browser_frame.cc.orig	2022-08-31 12:19:35 UTC
2 +++ chrome/browser/ui/views/frame/browser_frame.cc
3 @@ -49,11 +49,11 @@
4 
5  // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
6  // of lacros-chrome is complete.
7 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
8 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
9  #include "ui/display/screen.h"
10  #endif
11 
12 -#if BUILDFLAG(IS_LINUX)
13 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
14  #include "ui/linux/linux_ui.h"
15  #endif
16 
17 @@ -62,7 +62,7 @@ namespace {
18  bool IsUsingGtkTheme(Profile* profile) {
19  // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
20  // of lacros-chrome is complete.
21 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
22 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
23    return ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme();
24  #else
25    return false;
26 @@ -279,7 +279,7 @@ void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
27                                             IsVisibleOnAllWorkspaces());
28  // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
29  // of lacros-chrome is complete.
30 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
31 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
32    // If the window was sent to a different workspace, prioritize it if
33    // it was sent to the current workspace and deprioritize it
34    // otherwise.  This is done by MoveBrowsersInWorkspaceToFront()
35 @@ -402,7 +402,7 @@ void BrowserFrame::SelectNativeTheme() {
36      return;
37    }
38 
39 -#if BUILDFLAG(IS_LINUX)
40 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
41    const ui::LinuxUi* linux_ui = ui::LinuxUi::instance();
42    // Ignore GTK+ for web apps with window-controls-overlay as the
43    // display_override so the web contents can blend with the overlay by using
44 @@ -421,7 +421,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
45    bool need_regenerate = false;
46    // TODO(crbug.com/1052397): Revisit the macro expression once build flag
47    // switch of lacros-chrome is complete.
48 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
49 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
50    // GTK and user theme changes can both change frame buttons, so the frame
51    // always needs to be regenerated on Linux.
52    need_regenerate = true;
53