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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/browser_view_layout.h" 5 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 !bookmark_bar_->IsDetached()) { 527 !bookmark_bar_->IsDetached()) {
528 return 0; 528 return 0;
529 } 529 }
530 530
531 // Offset for the detached bookmark bar. 531 // Offset for the detached bookmark bar.
532 return bookmark_bar_->height() - 532 return bookmark_bar_->height() -
533 views::NonClientFrameView::kClientEdgeThickness; 533 views::NonClientFrameView::kClientEdgeThickness;
534 } 534 }
535 535
536 int BrowserViewLayout::LayoutDownloadShelf(int bottom) { 536 int BrowserViewLayout::LayoutDownloadShelf(int bottom) {
537 if (delegate_->DownloadShelfNeedsLayout()) { 537 if (!delegate_->DownloadShelfNeedsLayout())
538 bool visible = browser()->SupportsWindowFeature( 538 return bottom;
539 Browser::FEATURE_DOWNLOADSHELF); 539
540 DCHECK(download_shelf_); 540 DCHECK(download_shelf_);
541 int height = visible ? download_shelf_->GetPreferredSize().height() : 0; 541 int height = download_shelf_->GetPreferredSize().height();
542 download_shelf_->SetVisible(visible); 542 download_shelf_->SetVisible(true);
543 download_shelf_->SetBounds(vertical_layout_rect_.x(), bottom - height, 543 download_shelf_->SetBounds(vertical_layout_rect_.x(), bottom - height,
544 vertical_layout_rect_.width(), height); 544 vertical_layout_rect_.width(), height);
545 download_shelf_->Layout(); 545 download_shelf_->Layout();
546 bottom -= height; 546 return bottom - height;
547 }
548 return bottom;
549 } 547 }
550 548
551 bool BrowserViewLayout::InfobarVisible() const { 549 bool BrowserViewLayout::InfobarVisible() const {
552 // Cast to a views::View to access GetPreferredSize(). 550 // Cast to a views::View to access GetPreferredSize().
553 views::View* infobar_container = infobar_container_; 551 views::View* infobar_container = infobar_container_;
554 // NOTE: Can't check if the size IsEmpty() since it's always 0-width. 552 // NOTE: Can't check if the size IsEmpty() since it's always 0-width.
555 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) && 553 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) &&
556 (infobar_container->GetPreferredSize().height() != 0); 554 (infobar_container->GetPreferredSize().height() != 0);
557 } 555 }
OLDNEW
« 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