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

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

Issue 1704793002: Remove kDisableDownloadNotification and stop compiling shelf code on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 67edff3ffe395d9db05dbe8f93ebd98ddce5a427..be033974c7731626b51e68a60f44385e5c7819dc 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -534,18 +534,16 @@ int BrowserViewLayout::GetContentsOffsetForBookmarkBar() {
}
int BrowserViewLayout::LayoutDownloadShelf(int bottom) {
- if (delegate_->DownloadShelfNeedsLayout()) {
- bool visible = browser()->SupportsWindowFeature(
- Browser::FEATURE_DOWNLOADSHELF);
- DCHECK(download_shelf_);
- int height = visible ? download_shelf_->GetPreferredSize().height() : 0;
- download_shelf_->SetVisible(visible);
- download_shelf_->SetBounds(vertical_layout_rect_.x(), bottom - height,
- vertical_layout_rect_.width(), height);
- download_shelf_->Layout();
- bottom -= height;
- }
- return bottom;
+ if (!delegate_->DownloadShelfNeedsLayout())
+ return bottom;
+
+ DCHECK(download_shelf_);
+ int height = download_shelf_->GetPreferredSize().height();
+ download_shelf_->SetVisible(true);
+ download_shelf_->SetBounds(vertical_layout_rect_.x(), bottom - height,
+ vertical_layout_rect_.width(), height);
+ download_shelf_->Layout();
+ return bottom - height;
}
bool BrowserViewLayout::InfobarVisible() const {
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698