2018-09-06 11:29:45 +02:00
|
|
|
diff --git chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
2019-07-16 19:59:21 +02:00
|
|
|
index 07f06ac694f5..831fd9f82dbe 100644
|
2018-09-06 11:29:45 +02:00
|
|
|
--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
|
|
|
+++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
2019-02-21 01:42:36 +01:00
|
|
|
@@ -6,6 +6,7 @@
|
2018-09-06 11:29:45 +02:00
|
|
|
|
2019-02-21 01:42:36 +01:00
|
|
|
#include "base/bind.h"
|
2018-09-06 11:29:45 +02:00
|
|
|
#include "base/run_loop.h"
|
|
|
|
+#include "cef/libcef/features/features.h"
|
|
|
|
#include "chrome/browser/chrome_browser_main.h"
|
|
|
|
#include "chrome/browser/profiles/profile.h"
|
|
|
|
#include "chrome/browser/themes/theme_service.h"
|
2019-07-16 19:59:21 +02:00
|
|
|
@@ -29,6 +30,7 @@
|
2018-09-06 11:29:45 +02:00
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
+#if !BUILDFLAG(ENABLE_CEF)
|
|
|
|
ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
|
|
|
|
if (!window)
|
|
|
|
return nullptr;
|
2019-07-16 19:59:21 +02:00
|
|
|
@@ -53,6 +55,7 @@ ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
|
2018-09-06 11:29:45 +02:00
|
|
|
|
|
|
|
return ui::NativeTheme::GetInstanceForNativeUi();
|
|
|
|
}
|
|
|
|
+#endif // !BUILDFLAG(ENABLE_CEF)
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
2019-07-16 19:59:21 +02:00
|
|
|
@@ -67,9 +70,11 @@ void ChromeBrowserMainExtraPartsViewsLinux::PreEarlyInitialization() {
|
|
|
|
if (!linux_ui)
|
|
|
|
return;
|
2018-09-06 11:29:45 +02:00
|
|
|
|
|
|
|
+#if !BUILDFLAG(ENABLE_CEF)
|
2019-07-16 19:59:21 +02:00
|
|
|
linux_ui->SetNativeThemeOverride(
|
|
|
|
base::BindRepeating(&GetNativeThemeForWindow));
|
|
|
|
views::LinuxUI::SetInstance(linux_ui);
|
2018-09-06 11:29:45 +02:00
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() {
|
|
|
|
diff --git chrome/test/BUILD.gn chrome/test/BUILD.gn
|
2019-11-12 17:11:44 +01:00
|
|
|
index dde2eafb88f0..2594b51f35b1 100644
|
2018-09-06 11:29:45 +02:00
|
|
|
--- chrome/test/BUILD.gn
|
|
|
|
+++ chrome/test/BUILD.gn
|
2019-11-12 17:11:44 +01:00
|
|
|
@@ -4609,7 +4609,7 @@ test("unit_tests") {
|
2018-09-06 11:29:45 +02:00
|
|
|
if (use_gio) {
|
|
|
|
configs += [ "//build/linux:gio_config" ]
|
|
|
|
}
|
|
|
|
- if (!is_chromeos && !use_ozone && is_linux) {
|
|
|
|
+ if (!is_chromeos && !use_ozone && is_linux && use_gtk) {
|
|
|
|
deps += [ "//chrome/browser/ui/libgtkui" ]
|
|
|
|
}
|
|
|
|
|
2019-11-12 17:11:44 +01:00
|
|
|
@@ -5666,7 +5666,7 @@ if (!is_android) {
|
2018-09-06 11:29:45 +02:00
|
|
|
# suites, it seems like one or another starts timing out too.
|
|
|
|
"../browser/ui/views/keyboard_access_browsertest.cc",
|
|
|
|
]
|
|
|
|
- if (!use_ozone) {
|
|
|
|
+ if (!use_ozone && use_gtk) {
|
|
|
|
sources += [
|
|
|
|
"../browser/ui/libgtkui/select_file_dialog_interactive_uitest.cc",
|
|
|
|
]
|