OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
6 | 6 |
7 #include "app/drag_drop_types.h" | 7 #include "app/drag_drop_types.h" |
8 #include "app/gfx/canvas.h" | 8 #include "app/gfx/canvas.h" |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/os_exchange_data.h" | 10 #include "app/os_exchange_data.h" |
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1872 if (ShowExtensionsOnTop()) | 1872 if (ShowExtensionsOnTop()) |
1873 extension_shelf_->SetVisible(false); | 1873 extension_shelf_->SetVisible(false); |
1874 return y; | 1874 return y; |
1875 } | 1875 } |
1876 | 1876 |
1877 int bookmark_bar_height = bookmark_bar_view_->GetPreferredSize().height(); | 1877 int bookmark_bar_height = bookmark_bar_view_->GetPreferredSize().height(); |
1878 y -= kSeparationLineHeight + (bookmark_bar_view_->IsDetachedStyle() ? | 1878 y -= kSeparationLineHeight + (bookmark_bar_view_->IsDetachedStyle() ? |
1879 0 : bookmark_bar_view_->GetToolbarOverlap(false)); | 1879 0 : bookmark_bar_view_->GetToolbarOverlap(false)); |
1880 | 1880 |
1881 if (ShowExtensionsOnTop()) { | 1881 if (ShowExtensionsOnTop()) { |
1882 int extensionshelf_height = extension_shelf_->GetPreferredSize().height(); | |
1883 if (extensionshelf_height >= bookmark_bar_height) | |
1884 bookmark_bar_height = extensionshelf_height; | |
1885 | |
1886 if (!bookmark_bar_view_->IsDetachedStyle()) { | 1882 if (!bookmark_bar_view_->IsDetachedStyle()) { |
1887 int extension_shelf_width = | 1883 int extension_shelf_width = |
1888 extension_shelf_->GetPreferredSize().width(); | 1884 extension_shelf_->GetPreferredSize().width(); |
1889 int bookmark_bar_given_width = width() - extension_shelf_width; | 1885 int bookmark_bar_given_width = width() - extension_shelf_width; |
1890 int minimum_allowed_bookmark_bar_width = | 1886 int minimum_allowed_bookmark_bar_width = |
1891 bookmark_bar_view_->GetMinimumSize().width(); | 1887 bookmark_bar_view_->GetMinimumSize().width(); |
1892 if (bookmark_bar_given_width < minimum_allowed_bookmark_bar_width) { | 1888 if (bookmark_bar_given_width < minimum_allowed_bookmark_bar_width) { |
1893 // The bookmark bar cannot compromise on its width any more. The | 1889 // The bookmark bar cannot compromise on its width any more. The |
1894 // extension shelf needs to shrink now. | 1890 // extension shelf needs to shrink now. |
1895 extension_shelf_width = | 1891 extension_shelf_width = |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2304 | 2300 |
2305 // static | 2301 // static |
2306 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2302 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2307 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2303 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2308 } | 2304 } |
2309 | 2305 |
2310 // static | 2306 // static |
2311 void BrowserList::AllBrowsersClosed() { | 2307 void BrowserList::AllBrowsersClosed() { |
2312 views::Window::CloseAllSecondaryWindows(); | 2308 views::Window::CloseAllSecondaryWindows(); |
2313 } | 2309 } |
OLD | NEW |