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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc

Issue 146343002: Refactor OpaqueBrowserFrameView; reduce uses of kUseSystemTitleBar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests. Created 6 years, 11 months 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/frame/opaque_browser_frame_view_layout.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
index 8d32d1125d5d665a456ff2b7b0cbe4dec445c5a4..41534a5d46595a6fdae1dc22c6bb1432675615ef 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
@@ -268,12 +268,10 @@ gfx::Rect OpaqueBrowserFrameViewLayout::CalculateClientAreaBounds(
}
bool OpaqueBrowserFrameViewLayout::IsTitleBarCondensed() const {
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseSystemTitleBar))
- return true;
-#endif
-
- return delegate_->IsMaximized();
+ // If there are no caption buttons, there is no need to have an uncondensed
+ // title bar. If the window is maximized, the title bar is condensed
+ // regardless of whether there are caption buttons.
+ return !delegate_->ShouldShowCaptionButtons() || delegate_->IsMaximized();
}
///////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698