| 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 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 | 1626 |
| 1627 int top = LayoutTabStrip(); | 1627 int top = LayoutTabStrip(); |
| 1628 top = LayoutToolbar(top); | 1628 top = LayoutToolbar(top); |
| 1629 top = LayoutBookmarkAndInfoBars(top); | 1629 top = LayoutBookmarkAndInfoBars(top); |
| 1630 int bottom = LayoutExtensionAndDownloadShelves(); | 1630 int bottom = LayoutExtensionAndDownloadShelves(); |
| 1631 LayoutTabContents(top, bottom); | 1631 LayoutTabContents(top, bottom); |
| 1632 // This must be done _after_ we lay out the TabContents since this code calls | 1632 // This must be done _after_ we lay out the TabContents since this code calls |
| 1633 // back into us to find the bounding box the find bar must be laid out within, | 1633 // back into us to find the bounding box the find bar must be laid out within, |
| 1634 // and that code depends on the TabContentsContainer's bounds being up to | 1634 // and that code depends on the TabContentsContainer's bounds being up to |
| 1635 // date. | 1635 // date. |
| 1636 FindBarController* find_controller = browser_->find_bar(); | 1636 if (browser_->HasFindBarController()) { |
| 1637 if (find_controller) | 1637 browser_->GetFindBarController()->find_bar()->MoveWindowIfNecessary( |
| 1638 find_controller->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true); | 1638 gfx::Rect(), true); |
| 1639 } |
| 1639 // Align status bubble with the bottom of the contents_container_. | 1640 // Align status bubble with the bottom of the contents_container_. |
| 1640 LayoutStatusBubble(top + contents_container_->bounds().height()); | 1641 LayoutStatusBubble(top + contents_container_->bounds().height()); |
| 1641 SchedulePaint(); | 1642 SchedulePaint(); |
| 1642 } | 1643 } |
| 1643 | 1644 |
| 1644 void BrowserView::ViewHierarchyChanged(bool is_add, | 1645 void BrowserView::ViewHierarchyChanged(bool is_add, |
| 1645 views::View* parent, | 1646 views::View* parent, |
| 1646 views::View* child) { | 1647 views::View* child) { |
| 1647 if (is_add && child == this && GetWidget() && !initialized_) { | 1648 if (is_add && child == this && GetWidget() && !initialized_) { |
| 1648 Init(); | 1649 Init(); |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2256 | 2257 |
| 2257 // static | 2258 // static |
| 2258 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2259 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
| 2259 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2260 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
| 2260 } | 2261 } |
| 2261 | 2262 |
| 2262 // static | 2263 // static |
| 2263 void BrowserList::AllBrowsersClosed() { | 2264 void BrowserList::AllBrowsersClosed() { |
| 2264 views::Window::CloseAllSecondaryWindows(); | 2265 views::Window::CloseAllSecondaryWindows(); |
| 2265 } | 2266 } |
| OLD | NEW |