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/tab_contents/match_preview.h" | 35 #include "chrome/browser/tab_contents/match_preview.h" |
34 #include "chrome/browser/tab_contents/tab_contents.h" | 36 #include "chrome/browser/tab_contents/tab_contents.h" |
35 #include "chrome/browser/tab_contents/tab_contents_view.h" | 37 #include "chrome/browser/tab_contents/tab_contents_view.h" |
36 #include "chrome/browser/view_ids.h" | 38 #include "chrome/browser/view_ids.h" |
(...skipping 10 matching lines...) Expand all Loading... |
47 #include "chrome/browser/views/theme_install_bubble_view.h" | 49 #include "chrome/browser/views/theme_install_bubble_view.h" |
48 #include "chrome/browser/views/toolbar_view.h" | 50 #include "chrome/browser/views/toolbar_view.h" |
49 #include "chrome/browser/views/update_recommended_message_box.h" | 51 #include "chrome/browser/views/update_recommended_message_box.h" |
50 #include "chrome/browser/window_sizer.h" | 52 #include "chrome/browser/window_sizer.h" |
51 #include "chrome/browser/wrench_menu_model.h" | 53 #include "chrome/browser/wrench_menu_model.h" |
52 #include "chrome/common/chrome_switches.h" | 54 #include "chrome/common/chrome_switches.h" |
53 #include "chrome/common/extensions/extension_resource.h" | 55 #include "chrome/common/extensions/extension_resource.h" |
54 #include "chrome/common/native_window_notification_source.h" | 56 #include "chrome/common/native_window_notification_source.h" |
55 #include "chrome/common/notification_service.h" | 57 #include "chrome/common/notification_service.h" |
56 #include "chrome/common/pref_names.h" | 58 #include "chrome/common/pref_names.h" |
| 59 #include "chrome/common/url_constants.h" |
57 #include "gfx/canvas_skia.h" | 60 #include "gfx/canvas_skia.h" |
58 #include "grit/app_resources.h" | 61 #include "grit/app_resources.h" |
59 #include "grit/chromium_strings.h" | 62 #include "grit/chromium_strings.h" |
60 #include "grit/generated_resources.h" | 63 #include "grit/generated_resources.h" |
61 #include "grit/locale_settings.h" | 64 #include "grit/locale_settings.h" |
62 #include "grit/theme_resources.h" | 65 #include "grit/theme_resources.h" |
63 #include "grit/webkit_resources.h" | 66 #include "grit/webkit_resources.h" |
64 #include "views/controls/single_split_view.h" | 67 #include "views/controls/single_split_view.h" |
65 #include "views/focus/external_focus_tracker.h" | 68 #include "views/focus/external_focus_tracker.h" |
66 #include "views/focus/view_storage.h" | 69 #include "views/focus/view_storage.h" |
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 | 1111 |
1109 DownloadShelf* BrowserView::GetDownloadShelf() { | 1112 DownloadShelf* BrowserView::GetDownloadShelf() { |
1110 if (!download_shelf_.get()) { | 1113 if (!download_shelf_.get()) { |
1111 download_shelf_.reset(new DownloadShelfView(browser_.get(), this)); | 1114 download_shelf_.reset(new DownloadShelfView(browser_.get(), this)); |
1112 download_shelf_->set_parent_owned(false); | 1115 download_shelf_->set_parent_owned(false); |
1113 } | 1116 } |
1114 return download_shelf_.get(); | 1117 return download_shelf_.get(); |
1115 } | 1118 } |
1116 | 1119 |
1117 void BrowserView::ShowReportBugDialog() { | 1120 void BrowserView::ShowReportBugDialog() { |
1118 // Retrieve the URL for the current tab (if any) and tell the BugReportView | 1121 browser::ShowHtmlBugReportView(GetWindow(), browser_.get()); |
1119 TabContents* current_tab = browser_->GetSelectedTabContents(); | |
1120 if (!current_tab) | |
1121 return; | |
1122 browser::ShowBugReportView(GetWindow(), browser_->profile(), current_tab); | |
1123 } | 1122 } |
1124 | 1123 |
1125 void BrowserView::ShowClearBrowsingDataDialog() { | 1124 void BrowserView::ShowClearBrowsingDataDialog() { |
1126 browser::ShowClearBrowsingDataView(GetWindow()->GetNativeWindow(), | 1125 browser::ShowClearBrowsingDataView(GetWindow()->GetNativeWindow(), |
1127 browser_->profile()); | 1126 browser_->profile()); |
1128 } | 1127 } |
1129 | 1128 |
1130 void BrowserView::ShowImportDialog() { | 1129 void BrowserView::ShowImportDialog() { |
1131 browser::ShowImporterView(GetWidget(), browser_->profile()); | 1130 browser::ShowImporterView(GetWidget(), browser_->profile()); |
1132 } | 1131 } |
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2376 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); | 2375 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); |
2377 | 2376 |
2378 return view; | 2377 return view; |
2379 } | 2378 } |
2380 #endif | 2379 #endif |
2381 | 2380 |
2382 // static | 2381 // static |
2383 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2382 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2384 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2383 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2385 } | 2384 } |
OLD | NEW |