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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_view.cc

Issue 1636703002: Implement MD specs for non-tabbed windows in Ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test changed, ready for review Created 4 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/toolbar/toolbar_view.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index a94a409cdd249c94800faa69864940787929f163..593476a7f967992fd57b42cd06e9de49a9c088c5 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -699,6 +699,9 @@ void ToolbarView::UpdateBadgeSeverity(AppMenuBadgeController::BadgeType type,
}
int ToolbarView::PopupTopSpacing() const {
+ if (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH)
+ return 0;
+
const int kAdditionalPopupTopSpacingNonGlass = 2;
return views::NonClientFrameView::kClientEdgeThickness +
(GetWidget()->ShouldWindowContentsBeTransparent() ?
@@ -746,14 +749,7 @@ gfx::Size ToolbarView::SizeForContentSize(gfx::Size size) const {
size.SetToMax(
gfx::Size(0, normal_background->height() - content_shadow_height()));
}
- } else if (size.height() == 0) {
- // Location mode with a 0 height location bar. If on ash, expand by one
- // pixel to show a border in the title bar, otherwise leave the size as zero
- // height.
- const int kAshBorderSpacing = 1;
- if (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH)
- size.Enlarge(0, kAshBorderSpacing);
- } else {
+ } else if (size.height() > 0) {
size.Enlarge(
0, PopupTopSpacing() + views::NonClientFrameView::kClientEdgeThickness);
}

Powered by Google App Engine
This is Rietveld 408576698