| 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(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "chrome/browser/tab_contents/tab_contents_view.h" | 36 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| 37 #include "chrome/browser/tabs/tab_strip_model.h" | 37 #include "chrome/browser/tabs/tab_strip_model.h" |
| 38 #include "chrome/browser/themes/browser_theme_provider.h" | 38 #include "chrome/browser/themes/browser_theme_provider.h" |
| 39 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" | 39 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" |
| 40 #include "chrome/browser/ui/browser.h" | 40 #include "chrome/browser/ui/browser.h" |
| 41 #include "chrome/browser/ui/browser_dialogs.h" | 41 #include "chrome/browser/ui/browser_dialogs.h" |
| 42 #include "chrome/browser/ui/browser_list.h" | 42 #include "chrome/browser/ui/browser_list.h" |
| 43 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 43 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 44 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" | 44 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" |
| 45 #include "chrome/browser/ui/view_ids.h" | 45 #include "chrome/browser/ui/view_ids.h" |
| 46 #include "chrome/browser/ui/views/accessible_view_helper.h" | |
| 47 #include "chrome/browser/ui/views/bookmark_bar_view.h" | 46 #include "chrome/browser/ui/views/bookmark_bar_view.h" |
| 48 #include "chrome/browser/ui/views/browser_dialogs.h" | 47 #include "chrome/browser/ui/views/browser_dialogs.h" |
| 49 #include "chrome/browser/ui/views/default_search_view.h" | 48 #include "chrome/browser/ui/views/default_search_view.h" |
| 50 #include "chrome/browser/ui/views/download_shelf_view.h" | 49 #include "chrome/browser/ui/views/download_shelf_view.h" |
| 51 #include "chrome/browser/ui/views/frame/browser_view_layout.h" | 50 #include "chrome/browser/ui/views/frame/browser_view_layout.h" |
| 52 #include "chrome/browser/ui/views/frame/contents_container.h" | 51 #include "chrome/browser/ui/views/frame/contents_container.h" |
| 53 #include "chrome/browser/ui/views/fullscreen_exit_bubble.h" | 52 #include "chrome/browser/ui/views/fullscreen_exit_bubble.h" |
| 54 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" | 53 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" |
| 55 #include "chrome/browser/ui/views/status_bubble_views.h" | 54 #include "chrome/browser/ui/views/status_bubble_views.h" |
| 56 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" | 55 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" |
| (...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1846 tabstrip_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_TABSTRIP)); | 1845 tabstrip_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_TABSTRIP)); |
| 1847 AddChildView(tabstrip_); | 1846 AddChildView(tabstrip_); |
| 1848 | 1847 |
| 1849 tabstrip_controller->InitFromModel(tabstrip_); | 1848 tabstrip_controller->InitFromModel(tabstrip_); |
| 1850 } | 1849 } |
| 1851 | 1850 |
| 1852 /////////////////////////////////////////////////////////////////////////////// | 1851 /////////////////////////////////////////////////////////////////////////////// |
| 1853 // BrowserView, private: | 1852 // BrowserView, private: |
| 1854 | 1853 |
| 1855 void BrowserView::Init() { | 1854 void BrowserView::Init() { |
| 1856 accessible_view_helper_.reset(new AccessibleViewHelper( | |
| 1857 this, browser_->profile())); | |
| 1858 | |
| 1859 SetLayoutManager(CreateLayoutManager()); | 1855 SetLayoutManager(CreateLayoutManager()); |
| 1860 // Stow a pointer to this object onto the window handle so that we can get at | 1856 // Stow a pointer to this object onto the window handle so that we can get at |
| 1861 // it later when all we have is a native view. | 1857 // it later when all we have is a native view. |
| 1862 GetWidget()->SetNativeWindowProperty(kBrowserViewKey, this); | 1858 GetWidget()->SetNativeWindowProperty(kBrowserViewKey, this); |
| 1863 | 1859 |
| 1864 // Stow a pointer to the browser's profile onto the window handle so that we | 1860 // Stow a pointer to the browser's profile onto the window handle so that we |
| 1865 // can get it later when all we have is a native view. | 1861 // can get it later when all we have is a native view. |
| 1866 GetWindow()->SetNativeWindowProperty(Profile::kProfileKey, | 1862 GetWindow()->SetNativeWindowProperty(Profile::kProfileKey, |
| 1867 browser_->profile()); | 1863 browser_->profile()); |
| 1868 | 1864 |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2561 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2557 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| 2562 | 2558 |
| 2563 return view; | 2559 return view; |
| 2564 } | 2560 } |
| 2565 #endif | 2561 #endif |
| 2566 | 2562 |
| 2567 // static | 2563 // static |
| 2568 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2564 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
| 2569 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2565 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
| 2570 } | 2566 } |
| OLD | NEW |