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

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

Issue 2360803002: Remove some pre-MD code from toolbar/tabstrip/frame. (Closed)
Patch Set: pkasting review Created 4 years, 3 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_view_layout.cc
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.cc b/chrome/browser/ui/views/frame/browser_view_layout.cc
index dc81ce199cdb35a285c5dbdfb6f087597325b2b3..f283cc62f620bb22c7158a9501ddce8f58514b82 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -173,8 +173,6 @@ gfx::Size BrowserViewLayout::GetMinimumSize() {
(browser()->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) ||
browser()->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) ?
toolbar_->GetMinimumSize() : gfx::Size());
- if (tabstrip_size.height() && toolbar_size.height())
- toolbar_size.Enlarge(0, -GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP));
gfx::Size bookmark_bar_size;
if (bookmark_bar_ &&
bookmark_bar_->visible() &&
@@ -404,14 +402,11 @@ int BrowserViewLayout::LayoutTabStripRegion(int top) {
int BrowserViewLayout::LayoutToolbar(int top) {
int browser_view_width = vertical_layout_rect_.width();
bool toolbar_visible = delegate_->IsToolbarVisible();
- int y = top;
- y -= (toolbar_visible && delegate_->IsTabStripVisible()) ?
- GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP) : 0;
int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
toolbar_->SetVisible(toolbar_visible);
- toolbar_->SetBounds(vertical_layout_rect_.x(), y, browser_view_width, height);
-
- return y + height;
+ toolbar_->SetBounds(vertical_layout_rect_.x(), top, browser_view_width,
+ height);
+ return toolbar_->bounds().bottom();
}
int BrowserViewLayout::LayoutBookmarkAndInfoBars(int top, int browser_view_y) {

Powered by Google App Engine
This is Rietveld 408576698