Index: chrome/browser/ui/views/apps/native_app_window_views.cc |
diff --git a/chrome/browser/ui/views/apps/native_app_window_views.cc b/chrome/browser/ui/views/apps/native_app_window_views.cc |
index 2cc77407c5feda21e4c0d630a1e9fa068719b692..7a8377456eeaabd64f901d27f45355fa221afe23 100644 |
--- a/chrome/browser/ui/views/apps/native_app_window_views.cc |
+++ b/chrome/browser/ui/views/apps/native_app_window_views.cc |
@@ -256,6 +256,14 @@ void NativeAppWindowViews::InitializeDefaultWindow( |
views::Widget::InitParams init_params(views::Widget::InitParams::TYPE_WINDOW); |
init_params.delegate = this; |
init_params.remove_standard_frame = ShouldUseChromeStyleFrame(); |
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
+ // If not using system title bars on Linux, remove the standard frame. |
+ // Instead, we will use CustomFrameView to draw a native-like frame. |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kUseSystemTitleBar)) { |
+ init_params.remove_standard_frame = true; |
+ } |
+#endif |
init_params.use_system_default_icon = true; |
// TODO(erg): Conceptually, these are toplevel windows, but we theoretically |
// could plumb context through to here in some cases. |
@@ -786,6 +794,14 @@ views::NonClientFrameView* NativeAppWindowViews::CreateNonClientFrameView( |
} |
} |
#endif |
+ |
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
+ // If using the system title bar, we need a ShellWindowFrameView instead of a |
+ // CustomFrameView. The ShellWindowFrameView will not draw its own frame. |
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseSystemTitleBar)) |
+ return CreateShellWindowFrameView(); |
+#endif |
+ |
if (ShouldUseChromeStyleFrame()) |
return CreateShellWindowFrameView(); |
return views::WidgetDelegateView::CreateNonClientFrameView(widget); |