OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1814 0); | 1814 0); |
1815 aeropeek_manager_->SetContentInsets(insets); | 1815 aeropeek_manager_->SetContentInsets(insets); |
1816 } | 1816 } |
1817 #endif | 1817 #endif |
1818 } | 1818 } |
1819 | 1819 |
1820 void BrowserView::PaintChildren(gfx::Canvas* canvas) { | 1820 void BrowserView::PaintChildren(gfx::Canvas* canvas) { |
1821 // Paint the |infobar_container_| last so that it may paint its | 1821 // Paint the |infobar_container_| last so that it may paint its |
1822 // overlapping tabs. | 1822 // overlapping tabs. |
1823 for (int i = 0; i < child_count(); ++i) { | 1823 for (int i = 0; i < child_count(); ++i) { |
1824 View* child = GetChildViewAt(i); | 1824 View* child = child_at(i); |
1825 if (child != infobar_container_) | 1825 if (child != infobar_container_) |
1826 child->Paint(canvas); | 1826 child->Paint(canvas); |
1827 } | 1827 } |
1828 | 1828 |
1829 infobar_container_->Paint(canvas); | 1829 infobar_container_->Paint(canvas); |
1830 } | 1830 } |
1831 | 1831 |
1832 void BrowserView::ViewHierarchyChanged(bool is_add, | 1832 void BrowserView::ViewHierarchyChanged(bool is_add, |
1833 views::View* parent, | 1833 views::View* parent, |
1834 views::View* child) { | 1834 views::View* child) { |
(...skipping 28 matching lines...) Expand all Loading... |
1863 toolbar_->location_bar()->location_icon_view(); | 1863 toolbar_->location_bar()->location_icon_view(); |
1864 gfx::Point icon_center(location_icon_view->GetImageBounds().CenterPoint()); | 1864 gfx::Point icon_center(location_icon_view->GetImageBounds().CenterPoint()); |
1865 ConvertPointToView(location_icon_view, this, &icon_center); | 1865 ConvertPointToView(location_icon_view, this, &icon_center); |
1866 *x = icon_center.x(); | 1866 *x = icon_center.x(); |
1867 } | 1867 } |
1868 return true; | 1868 return true; |
1869 } | 1869 } |
1870 | 1870 |
1871 bool BrowserView::SplitHandleMoved(views::SingleSplitView* view) { | 1871 bool BrowserView::SplitHandleMoved(views::SingleSplitView* view) { |
1872 for (int i = 0; i < view->child_count(); ++i) | 1872 for (int i = 0; i < view->child_count(); ++i) |
1873 view->GetChildViewAt(i)->InvalidateLayout(); | 1873 view->child_at(i)->InvalidateLayout(); |
1874 SchedulePaint(); | 1874 SchedulePaint(); |
1875 Layout(); | 1875 Layout(); |
1876 return false; | 1876 return false; |
1877 } | 1877 } |
1878 | 1878 |
1879 views::LayoutManager* BrowserView::CreateLayoutManager() const { | 1879 views::LayoutManager* BrowserView::CreateLayoutManager() const { |
1880 return new BrowserViewLayout; | 1880 return new BrowserViewLayout; |
1881 } | 1881 } |
1882 | 1882 |
1883 void BrowserView::InitTabStrip(TabStripModel* model) { | 1883 void BrowserView::InitTabStrip(TabStripModel* model) { |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2641 view->GetWidget()->non_client_view()->SetAccessibleName( | 2641 view->GetWidget()->non_client_view()->SetAccessibleName( |
2642 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2642 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2643 return view; | 2643 return view; |
2644 } | 2644 } |
2645 #endif | 2645 #endif |
2646 | 2646 |
2647 // static | 2647 // static |
2648 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2648 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2649 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2649 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2650 } | 2650 } |
OLD | NEW |