Chromium Code Reviews| Index: chrome/browser/ui/views/frame/browser_view_layout.cc |
| =================================================================== |
| --- chrome/browser/ui/views/frame/browser_view_layout.cc (revision 115251) |
| +++ chrome/browser/ui/views/frame/browser_view_layout.cc (working copy) |
| @@ -4,7 +4,6 @@ |
| #include "chrome/browser/ui/views/frame/browser_view_layout.h" |
| -#include "chrome/browser/sidebar/sidebar_manager.h" |
| #include "chrome/browser/ui/find_bar/find_bar.h" |
| #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| #include "chrome/browser/ui/view_ids.h" |
| @@ -419,43 +418,21 @@ |
| // (and its contents) is resized and laid out only once. |
| // The views hierarcy (see browser_view.h for more details): |
| - // 1) Sidebar is not allowed: |
| - // contents_split_ -> [contents_container_ | devtools] |
| - // 2) Sidebar is allowed: |
| - // contents_split_ -> |
| - // [sidebar_split -> [contents_container_ | sidebar]] | devtools |
| + // contents_split_ -> [contents_container_ | devtools] |
| - gfx::Rect sidebar_split_bounds; |
| gfx::Rect contents_bounds; |
| - gfx::Rect sidebar_bounds; |
| gfx::Rect devtools_bounds; |
| gfx::Rect contents_split_bounds(vertical_layout_rect_.x(), top, |
| vertical_layout_rect_.width(), |
| std::max(0, bottom - top)); |
| - contents_split_->CalculateChildrenBounds( |
|
Devlin
2011/12/21 02:11:27
Looking at the CalculateChildrenBounds method, it
Aaron Boodman
2011/12/21 08:38:20
Ben should confirm this.
|
| - contents_split_bounds, &sidebar_split_bounds, &devtools_bounds); |
| gfx::Point contents_split_offset( |
| contents_split_bounds.x() - contents_split_->bounds().x(), |
| contents_split_bounds.y() - contents_split_->bounds().y()); |
| - gfx::Point sidebar_split_offset(contents_split_offset); |
| - sidebar_split_offset.Offset(sidebar_split_bounds.x(), |
| - sidebar_split_bounds.y()); |
| - views::SingleSplitView* sidebar_split = browser_view_->sidebar_split_; |
| - if (sidebar_split) { |
| - DCHECK(sidebar_split == contents_split_->child_at(0)); |
| - sidebar_split->CalculateChildrenBounds( |
| - sidebar_split_bounds, &contents_bounds, &sidebar_bounds); |
| - } else { |
| - contents_bounds = sidebar_split_bounds; |
| - } |
| - |
| - // Layout resize corner, sidebar mini tabs and calculate reserved contents |
| + // Layout resize corner and calculate reserved contents |
| // rects here as all contents view bounds are already determined, but not yet |
| // set at this point, so contents will be laid out once at most. |
| - // TODO(alekseys): layout sidebar minitabs and adjust reserved rect |
| - // accordingly. |
| gfx::Rect browser_reserved_rect; |
| if (!browser_view_->frame_->IsMaximized() && |
| !browser_view_->frame_->IsFullscreen()) { |
| @@ -473,13 +450,7 @@ |
| UpdateReservedContentsRect(browser_reserved_rect, |
| browser_view_->contents_container_, |
| contents_bounds, |
| - sidebar_split_offset); |
| - if (sidebar_split) { |
| - UpdateReservedContentsRect(browser_reserved_rect, |
| - browser_view_->sidebar_container_, |
| - sidebar_bounds, |
| - sidebar_split_offset); |
| - } |
| + contents_split_offset); |
| UpdateReservedContentsRect(browser_reserved_rect, |
| browser_view_->devtools_container_, |
| devtools_bounds, |
| @@ -487,8 +458,6 @@ |
| // Now it's safe to actually resize all contents views in the hierarchy. |
| contents_split_->SetBoundsRect(contents_split_bounds); |
| - if (sidebar_split) |
| - sidebar_split->SetBoundsRect(sidebar_split_bounds); |
| } |
| int BrowserViewLayout::GetTopMarginForActiveContent() { |
| @@ -500,13 +469,6 @@ |
| if (contents_split_->child_at(1) && contents_split_->child_at(1)->visible()) |
| return 0; |
| - if (SidebarManager::IsSidebarAllowed()) { |
| - views::View* sidebar_split = contents_split_->child_at(0); |
| - if (sidebar_split->child_count() >= 2 && |
| - sidebar_split->child_at(1)->visible()) |
| - return 0; |
| - } |
| - |
| // Adjust for separator. |
| return active_bookmark_bar_->height() - |
| views::NonClientFrameView::kClientEdgeThickness; |