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 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1815 return kViewClassName; | 1815 return kViewClassName; |
1816 } | 1816 } |
1817 | 1817 |
1818 void BrowserView::Layout() { | 1818 void BrowserView::Layout() { |
1819 if (!initialized_ || in_process_fullscreen_) | 1819 if (!initialized_ || in_process_fullscreen_) |
1820 return; | 1820 return; |
1821 | 1821 |
1822 views::View::Layout(); | 1822 views::View::Layout(); |
1823 | 1823 |
1824 // TODO(jamescook): Why was this in the middle of layout code? | 1824 // TODO(jamescook): Why was this in the middle of layout code? |
1825 toolbar_->location_bar()->omnibox_view()->set_focusable(IsToolbarVisible()); | 1825 toolbar_->location_bar()->omnibox_view()->SetFocusable(IsToolbarVisible()); |
1826 | 1826 |
1827 // The status bubble position requires that all other layout finish first. | 1827 // The status bubble position requires that all other layout finish first. |
1828 LayoutStatusBubble(); | 1828 LayoutStatusBubble(); |
1829 } | 1829 } |
1830 | 1830 |
1831 void BrowserView::PaintChildren(gfx::Canvas* canvas) { | 1831 void BrowserView::PaintChildren(gfx::Canvas* canvas) { |
1832 // Paint the |infobar_container_| last so that it may paint its | 1832 // Paint the |infobar_container_| last so that it may paint its |
1833 // overlapping tabs. | 1833 // overlapping tabs. |
1834 for (int i = 0; i < child_count(); ++i) { | 1834 for (int i = 0; i < child_count(); ++i) { |
1835 View* child = child_at(i); | 1835 View* child = child_at(i); |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2671 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2671 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
2672 gfx::Point icon_bottom( | 2672 gfx::Point icon_bottom( |
2673 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2673 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
2674 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2674 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
2675 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2675 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
2676 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2676 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
2677 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2677 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
2678 } | 2678 } |
2679 return top_arrow_height; | 2679 return top_arrow_height; |
2680 } | 2680 } |
OLD | NEW |