OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 |
11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
15 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
17 #include "chrome/app/chrome_dll_resource.h" | 17 #include "chrome/app/chrome_dll_resource.h" |
18 #include "chrome/browser/app_modal_dialog_queue.h" | 18 #include "chrome/browser/app_modal_dialog_queue.h" |
19 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 19 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
20 #include "chrome/browser/autocomplete/autocomplete_popup_view.h" | 20 #include "chrome/browser/autocomplete/autocomplete_popup_view.h" |
21 #include "chrome/browser/automation/ui_controls.h" | 21 #include "chrome/browser/automation/ui_controls.h" |
22 #include "chrome/browser/bookmarks/bookmark_utils.h" | 22 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 23 #include "chrome/browser/browser.h" |
23 #include "chrome/browser/browser_list.h" | 24 #include "chrome/browser/browser_list.h" |
24 #include "chrome/browser/browser_process.h" | 25 #include "chrome/browser/browser_process.h" |
25 #include "chrome/browser/browser_theme_provider.h" | 26 #include "chrome/browser/browser_theme_provider.h" |
26 #include "chrome/browser/debugger/devtools_window.h" | 27 #include "chrome/browser/debugger/devtools_window.h" |
| 28 #include "chrome/browser/dom_ui/bug_report_ui.h" |
27 #include "chrome/browser/download/download_manager.h" | 29 #include "chrome/browser/download/download_manager.h" |
28 #include "chrome/browser/ntp_background_util.h" | 30 #include "chrome/browser/ntp_background_util.h" |
29 #include "chrome/browser/page_info_window.h" | 31 #include "chrome/browser/page_info_window.h" |
30 #include "chrome/browser/pref_service.h" | 32 #include "chrome/browser/pref_service.h" |
31 #include "chrome/browser/profile.h" | 33 #include "chrome/browser/profile.h" |
32 #include "chrome/browser/sessions/tab_restore_service.h" | 34 #include "chrome/browser/sessions/tab_restore_service.h" |
33 #include "chrome/browser/sidebar/sidebar_container.h" | 35 #include "chrome/browser/sidebar/sidebar_container.h" |
34 #include "chrome/browser/sidebar/sidebar_manager.h" | 36 #include "chrome/browser/sidebar/sidebar_manager.h" |
35 #include "chrome/browser/tab_contents/match_preview.h" | 37 #include "chrome/browser/tab_contents/match_preview.h" |
36 #include "chrome/browser/tab_contents/tab_contents.h" | 38 #include "chrome/browser/tab_contents/tab_contents.h" |
(...skipping 12 matching lines...) Expand all Loading... |
49 #include "chrome/browser/views/theme_install_bubble_view.h" | 51 #include "chrome/browser/views/theme_install_bubble_view.h" |
50 #include "chrome/browser/views/toolbar_view.h" | 52 #include "chrome/browser/views/toolbar_view.h" |
51 #include "chrome/browser/views/update_recommended_message_box.h" | 53 #include "chrome/browser/views/update_recommended_message_box.h" |
52 #include "chrome/browser/window_sizer.h" | 54 #include "chrome/browser/window_sizer.h" |
53 #include "chrome/browser/wrench_menu_model.h" | 55 #include "chrome/browser/wrench_menu_model.h" |
54 #include "chrome/common/chrome_switches.h" | 56 #include "chrome/common/chrome_switches.h" |
55 #include "chrome/common/extensions/extension_resource.h" | 57 #include "chrome/common/extensions/extension_resource.h" |
56 #include "chrome/common/native_window_notification_source.h" | 58 #include "chrome/common/native_window_notification_source.h" |
57 #include "chrome/common/notification_service.h" | 59 #include "chrome/common/notification_service.h" |
58 #include "chrome/common/pref_names.h" | 60 #include "chrome/common/pref_names.h" |
| 61 #include "chrome/common/url_constants.h" |
59 #include "gfx/canvas_skia.h" | 62 #include "gfx/canvas_skia.h" |
60 #include "grit/app_resources.h" | 63 #include "grit/app_resources.h" |
61 #include "grit/chromium_strings.h" | 64 #include "grit/chromium_strings.h" |
62 #include "grit/generated_resources.h" | 65 #include "grit/generated_resources.h" |
63 #include "grit/locale_settings.h" | 66 #include "grit/locale_settings.h" |
64 #include "grit/theme_resources.h" | 67 #include "grit/theme_resources.h" |
65 #include "grit/webkit_resources.h" | 68 #include "grit/webkit_resources.h" |
66 #include "views/controls/single_split_view.h" | 69 #include "views/controls/single_split_view.h" |
67 #include "views/focus/external_focus_tracker.h" | 70 #include "views/focus/external_focus_tracker.h" |
68 #include "views/focus/view_storage.h" | 71 #include "views/focus/view_storage.h" |
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 | 1147 |
1145 DownloadShelf* BrowserView::GetDownloadShelf() { | 1148 DownloadShelf* BrowserView::GetDownloadShelf() { |
1146 if (!download_shelf_.get()) { | 1149 if (!download_shelf_.get()) { |
1147 download_shelf_.reset(new DownloadShelfView(browser_.get(), this)); | 1150 download_shelf_.reset(new DownloadShelfView(browser_.get(), this)); |
1148 download_shelf_->set_parent_owned(false); | 1151 download_shelf_->set_parent_owned(false); |
1149 } | 1152 } |
1150 return download_shelf_.get(); | 1153 return download_shelf_.get(); |
1151 } | 1154 } |
1152 | 1155 |
1153 void BrowserView::ShowReportBugDialog() { | 1156 void BrowserView::ShowReportBugDialog() { |
1154 // Retrieve the URL for the current tab (if any) and tell the BugReportView | 1157 browser::ShowHtmlBugReportView(GetWindow(), browser_.get()); |
1155 TabContents* current_tab = browser_->GetSelectedTabContents(); | |
1156 if (!current_tab) | |
1157 return; | |
1158 browser::ShowBugReportView(GetWindow(), browser_->profile(), current_tab); | |
1159 } | 1158 } |
1160 | 1159 |
1161 void BrowserView::ShowClearBrowsingDataDialog() { | 1160 void BrowserView::ShowClearBrowsingDataDialog() { |
1162 browser::ShowClearBrowsingDataView(GetWindow()->GetNativeWindow(), | 1161 browser::ShowClearBrowsingDataView(GetWindow()->GetNativeWindow(), |
1163 browser_->profile()); | 1162 browser_->profile()); |
1164 } | 1163 } |
1165 | 1164 |
1166 void BrowserView::ShowImportDialog() { | 1165 void BrowserView::ShowImportDialog() { |
1167 browser::ShowImporterView(GetWidget(), browser_->profile()); | 1166 browser::ShowImporterView(GetWidget(), browser_->profile()); |
1168 } | 1167 } |
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2513 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); | 2512 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); |
2514 | 2513 |
2515 return view; | 2514 return view; |
2516 } | 2515 } |
2517 #endif | 2516 #endif |
2518 | 2517 |
2519 // static | 2518 // static |
2520 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2519 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2521 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2520 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2522 } | 2521 } |
OLD | NEW |