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

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

Issue 9835013: Ash: Don't show window icon or title for app windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move to BrowserView, add line Created 8 years, 9 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/browser_non_client_frame_view_aura.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc
index e139586aedff37845943f712d21d087bde990032..fc309766c798e35ef4cf9edbf412b37929b7458d 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc
@@ -181,9 +181,12 @@ void BrowserNonClientFrameViewAura::OnPaint(gfx::Canvas* canvas) {
canvas,
GetThemeFrameBitmap(),
GetThemeFrameOverlayBitmap());
- frame_painter_->PaintTitleBar(this, canvas, BrowserFrame::GetTitleFont());
+ if (browser_view()->ShouldShowWindowTitle())
+ frame_painter_->PaintTitleBar(this, canvas, BrowserFrame::GetTitleFont());
if (browser_view()->IsToolbarVisible())
PaintToolbarBackground(canvas);
+ else
+ PaintContentEdge(canvas);
}
void BrowserNonClientFrameViewAura::Layout() {
@@ -274,14 +277,15 @@ int BrowserNonClientFrameViewAura::NonClientTopBorderHeight(
return kTabstripTopSpacingRestored;
if (frame()->IsFullscreen())
return 0;
- if (frame()->IsMaximized())
- return kTabstripTopSpacingMaximized;
- if (frame()->widget_delegate() &&
- frame()->widget_delegate()->ShouldShowWindowTitle()) {
- // For popups ensure we have enough space to see the full window buttons.
- return close_button_->bounds().bottom();
+ // Windows with tab strips need a smaller non-client area.
+ if (browser_view()->IsTabStripVisible()) {
+ if (frame()->IsMaximized())
+ return kTabstripTopSpacingMaximized;
+ return kTabstripTopSpacingRestored;
}
- return kTabstripTopSpacingRestored;
+ // For windows without a tab strip (popups, etc.) ensure we have enough space
+ // to see the window caption buttons and the content separator line.
+ return close_button_->bounds().bottom() + kClientEdgeThickness;
}
void BrowserNonClientFrameViewAura::LayoutAvatar() {
@@ -358,6 +362,12 @@ void BrowserNonClientFrameViewAura::PaintToolbarBackground(
ThemeService::GetDefaultColor(ThemeService::COLOR_TOOLBAR_SEPARATOR));
}
+void BrowserNonClientFrameViewAura::PaintContentEdge(gfx::Canvas* canvas) {
+ canvas->FillRect(gfx::Rect(0, close_button_->bounds().bottom(),
+ width(), kClientEdgeThickness),
+ ThemeService::GetDefaultColor(ThemeService::COLOR_TOOLBAR_SEPARATOR));
+}
+
const SkBitmap* BrowserNonClientFrameViewAura::GetThemeFrameBitmap() const {
bool is_incognito = browser_view()->IsOffTheRecord();
int resource_id;
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.h ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698