Chromium Code Reviews| 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 872c2e236d17668555f5c5f44b3a6150110435b0..486986236c798c2318a364e6a347e06cc9a69f5a 100644 |
| --- a/chrome/browser/ui/views/frame/browser_view_layout.cc |
| +++ b/chrome/browser/ui/views/frame/browser_view_layout.cc |
| @@ -222,7 +222,7 @@ void BrowserViewLayout::ViewAdded(views::View* host, views::View* view) { |
| break; |
| } |
| case VIEW_ID_INFO_BAR_CONTAINER: |
| - infobar_container_ = view; |
| + infobar_container_ = static_cast<InfoBarContainer*>(view); |
| break; |
| case VIEW_ID_DOWNLOAD_SHELF: |
| download_shelf_ = static_cast<DownloadShelfView*>(view); |
| @@ -362,12 +362,17 @@ int BrowserViewLayout::LayoutBookmarkBar(int top) { |
| } |
| int BrowserViewLayout::LayoutInfoBar(int top) { |
| + // Raise the |infobar_container_| by its overlapping tab_height. |
| bool visible = InfobarVisible(); |
| - int height = visible ? infobar_container_->GetPreferredSize().height() : 0; |
| infobar_container_->SetVisible(visible); |
| - infobar_container_->SetBounds(vertical_layout_rect_.x(), top, |
| - vertical_layout_rect_.width(), height); |
| - return top + height; |
| + int height = visible ? infobar_container_->GetPreferredSize().height() : 0; |
|
Peter Kasting
2011/03/07 20:14:30
Nit: I don't think either of these "visible ?" con
Sheridan Rawlins
2011/03/08 01:38:19
return browser()->SupportsWindowFeature(Browser::F
|
| + int overlapped_top = top - |
| + (visible ? infobar_container_->vertical_overlap() : 0); |
| + infobar_container_->SetBounds(vertical_layout_rect_.x(), |
| + overlapped_top, |
| + vertical_layout_rect_.width(), |
| + height); |
| + return overlapped_top + height; |
| } |
| // |browser_reserved_rect| is in browser_view_ coordinates. |