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