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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view_layout.cc

Issue 2368653002: Remove pre-MD code from browser/ui/views/tabs/tab.cc (Closed)
Patch Set: fix compile Created 4 years, 2 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
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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 // bounds to determine if the mouse is hovering over a button. 450 // bounds to determine if the mouse is hovering over a button.
451 bookmark_bar_->SetVisible(true); 451 bookmark_bar_->SetVisible(true);
452 return y + bookmark_bar_height; 452 return y + bookmark_bar_height;
453 } 453 }
454 454
455 int BrowserViewLayout::LayoutInfoBar(int top) { 455 int BrowserViewLayout::LayoutInfoBar(int top) {
456 // In immersive fullscreen, the infobar always starts near the top of the 456 // In immersive fullscreen, the infobar always starts near the top of the
457 // screen, just under the "light bar" rectangular stripes. 457 // screen, just under the "light bar" rectangular stripes.
458 if (immersive_mode_controller_->IsEnabled()) { 458 if (immersive_mode_controller_->IsEnabled()) {
459 top = browser_view_->y(); 459 top = browser_view_->y();
460 if (!immersive_mode_controller_->ShouldHideTabIndicators())
461 top += TabStrip::GetImmersiveHeight();
462 } 460 }
463 infobar_container_->SetVisible(InfobarVisible()); 461 infobar_container_->SetVisible(InfobarVisible());
464 infobar_container_->SetBounds( 462 infobar_container_->SetBounds(
465 vertical_layout_rect_.x(), top, vertical_layout_rect_.width(), 463 vertical_layout_rect_.x(), top, vertical_layout_rect_.width(),
466 infobar_container_->GetPreferredSize().height()); 464 infobar_container_->GetPreferredSize().height());
467 return top + infobar_container_->height(); 465 return top + infobar_container_->height();
468 } 466 }
469 467
470 void BrowserViewLayout::LayoutContentsContainerView(int top, int bottom) { 468 void BrowserViewLayout::LayoutContentsContainerView(int top, int bottom) {
471 // |contents_container_| contains web page contents and devtools. 469 // |contents_container_| contains web page contents and devtools.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 return bottom; 537 return bottom;
540 } 538 }
541 539
542 bool BrowserViewLayout::InfobarVisible() const { 540 bool BrowserViewLayout::InfobarVisible() const {
543 // Cast to a views::View to access GetPreferredSize(). 541 // Cast to a views::View to access GetPreferredSize().
544 views::View* infobar_container = infobar_container_; 542 views::View* infobar_container = infobar_container_;
545 // NOTE: Can't check if the size IsEmpty() since it's always 0-width. 543 // NOTE: Can't check if the size IsEmpty() since it's always 0-width.
546 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) && 544 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) &&
547 (infobar_container->GetPreferredSize().height() != 0); 545 (infobar_container->GetPreferredSize().height() != 0);
548 } 546 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698