Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3798)

Unified Diff: chrome/browser/ui/views/apps/native_app_window_views.cc

Issue 111723012: Linux Aura: Added --use-system-title-bar flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Formatting. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698