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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 return; | 1128 return; |
1129 ThemeInstallBubbleView::Show(tab_contents); | 1129 ThemeInstallBubbleView::Show(tab_contents); |
1130 } | 1130 } |
1131 | 1131 |
1132 void BrowserView::ConfirmBrowserCloseWithPendingDownloads() { | 1132 void BrowserView::ConfirmBrowserCloseWithPendingDownloads() { |
1133 DownloadInProgressDialogView* view = | 1133 DownloadInProgressDialogView* view = |
1134 new DownloadInProgressDialogView(browser_.get()); | 1134 new DownloadInProgressDialogView(browser_.get()); |
1135 browser::CreateViewsWindow(GetNativeHandle(), view)->Show(); | 1135 browser::CreateViewsWindow(GetNativeHandle(), view)->Show(); |
1136 } | 1136 } |
1137 | 1137 |
1138 void BrowserView::ShowHTMLDialog(HtmlDialogUIDelegate* delegate, | 1138 gfx::NativeWindow BrowserView::ShowHTMLDialog(HtmlDialogUIDelegate* delegate, |
1139 gfx::NativeWindow parent_window) { | 1139 gfx::NativeWindow parent_window) { |
1140 // Default to using our window as the parent if the argument is not specified. | 1140 // Default to using our window as the parent if the argument is not specified. |
1141 gfx::NativeWindow parent = parent_window ? parent_window | 1141 gfx::NativeWindow parent = parent_window ? parent_window |
1142 : GetNativeHandle(); | 1142 : GetNativeHandle(); |
1143 #if defined(OS_CHROMEOS) | 1143 #if defined(OS_CHROMEOS) |
1144 parent = GetNormalBrowserWindowForBrowser(browser(), NULL); | 1144 parent = GetNormalBrowserWindowForBrowser(browser(), NULL); |
1145 #endif // defined(OS_CHROMEOS) | 1145 #endif // defined(OS_CHROMEOS) |
1146 | 1146 |
1147 browser::ShowHtmlDialog(parent, browser_.get()->profile(), delegate); | 1147 return browser::ShowHtmlDialog(parent, browser_.get()->profile(), delegate); |
1148 } | 1148 } |
1149 | 1149 |
1150 void BrowserView::ShowCreateWebAppShortcutsDialog( | 1150 void BrowserView::ShowCreateWebAppShortcutsDialog( |
1151 TabContentsWrapper* tab_contents) { | 1151 TabContentsWrapper* tab_contents) { |
1152 browser::ShowCreateWebAppShortcutsDialog(GetNativeHandle(), tab_contents); | 1152 browser::ShowCreateWebAppShortcutsDialog(GetNativeHandle(), tab_contents); |
1153 } | 1153 } |
1154 | 1154 |
1155 void BrowserView::ShowCreateChromeAppShortcutsDialog(Profile* profile, | 1155 void BrowserView::ShowCreateChromeAppShortcutsDialog(Profile* profile, |
1156 const Extension* app) { | 1156 const Extension* app) { |
1157 browser::ShowCreateChromeAppShortcutsDialog(GetNativeHandle(), profile, app); | 1157 browser::ShowCreateChromeAppShortcutsDialog(GetNativeHandle(), profile, app); |
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2654 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2654 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
2655 // Create the view and the frame. The frame will attach itself via the view | 2655 // Create the view and the frame. The frame will attach itself via the view |
2656 // so we don't need to do anything with the pointer. | 2656 // so we don't need to do anything with the pointer. |
2657 BrowserView* view = new BrowserView(browser); | 2657 BrowserView* view = new BrowserView(browser); |
2658 (new BrowserFrame(view))->InitBrowserFrame(); | 2658 (new BrowserFrame(view))->InitBrowserFrame(); |
2659 view->GetWidget()->non_client_view()->SetAccessibleName( | 2659 view->GetWidget()->non_client_view()->SetAccessibleName( |
2660 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2660 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2661 return view; | 2661 return view; |
2662 } | 2662 } |
2663 #endif | 2663 #endif |
OLD | NEW |