OLD | NEW |
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.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 void BrowserView::Layout() { | 1777 void BrowserView::Layout() { |
1778 if (!initialized_ || in_process_fullscreen_) | 1778 if (!initialized_ || in_process_fullscreen_) |
1779 return; | 1779 return; |
1780 | 1780 |
1781 views::View::Layout(); | 1781 views::View::Layout(); |
1782 | 1782 |
1783 // TODO(jamescook): Why was this in the middle of layout code? | 1783 // TODO(jamescook): Why was this in the middle of layout code? |
1784 toolbar_->location_bar()->omnibox_view()->SetFocusable(IsToolbarVisible()); | 1784 toolbar_->location_bar()->omnibox_view()->SetFocusable(IsToolbarVisible()); |
1785 } | 1785 } |
1786 | 1786 |
1787 void BrowserView::PaintChildren(gfx::Canvas* canvas) { | 1787 void BrowserView::PaintChildren(gfx::Canvas* canvas, |
| 1788 const views::CullSet& cull_set) { |
1788 // Paint the |infobar_container_| last so that it may paint its | 1789 // Paint the |infobar_container_| last so that it may paint its |
1789 // overlapping tabs. | 1790 // overlapping tabs. |
1790 for (int i = 0; i < child_count(); ++i) { | 1791 for (int i = 0; i < child_count(); ++i) { |
1791 View* child = child_at(i); | 1792 View* child = child_at(i); |
1792 if (child != infobar_container_ && !child->layer()) | 1793 if (child != infobar_container_ && !child->layer()) |
1793 child->Paint(canvas); | 1794 child->Paint(canvas, cull_set); |
1794 } | 1795 } |
1795 | 1796 |
1796 infobar_container_->Paint(canvas); | 1797 infobar_container_->Paint(canvas, cull_set); |
1797 } | 1798 } |
1798 | 1799 |
1799 void BrowserView::ViewHierarchyChanged( | 1800 void BrowserView::ViewHierarchyChanged( |
1800 const ViewHierarchyChangedDetails& details) { | 1801 const ViewHierarchyChangedDetails& details) { |
1801 if (!initialized_ && details.is_add && details.child == this && GetWidget()) { | 1802 if (!initialized_ && details.is_add && details.child == this && GetWidget()) { |
1802 InitViews(); | 1803 InitViews(); |
1803 initialized_ = true; | 1804 initialized_ = true; |
1804 } | 1805 } |
1805 } | 1806 } |
1806 | 1807 |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2519 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2520 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
2520 gfx::Point icon_bottom( | 2521 gfx::Point icon_bottom( |
2521 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2522 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
2522 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2523 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
2523 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2524 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
2524 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2525 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
2525 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2526 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
2526 } | 2527 } |
2527 return top_arrow_height; | 2528 return top_arrow_height; |
2528 } | 2529 } |
OLD | NEW |