blob: 32e2538c934d4256c90acb55e08b5e252ab4e011 [file] [log] [blame]
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
index f76fb26d4780..4cc511600b3b 100644
--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
+++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
@@ -48,7 +48,7 @@ ChromeBrowserMainExtraPartsViewsLinux::
}
void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() {
-#if defined(USE_X11)
+#if defined(USE_X11) && BUILDFLAG(USE_GTK)
// In Aura/X11, Gtk-based LinuxUI implementation is used, so we instantiate
// and inject the GtkUiDelegate before ChromeBrowserMainExtraPartsViewsLinux,
// so it can properly initialize GtkUi on its |ToolkitInitialized| override.