| 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 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 return; | 1138 return; |
| 1139 ThemeInstallBubbleView::Show(tab_contents); | 1139 ThemeInstallBubbleView::Show(tab_contents); |
| 1140 } | 1140 } |
| 1141 | 1141 |
| 1142 void BrowserView::ConfirmBrowserCloseWithPendingDownloads() { | 1142 void BrowserView::ConfirmBrowserCloseWithPendingDownloads() { |
| 1143 DownloadInProgressDialogView* view = | 1143 DownloadInProgressDialogView* view = |
| 1144 new DownloadInProgressDialogView(browser_.get()); | 1144 new DownloadInProgressDialogView(browser_.get()); |
| 1145 browser::CreateViewsWindow(GetNativeHandle(), view)->Show(); | 1145 browser::CreateViewsWindow(GetNativeHandle(), view)->Show(); |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 void BrowserView::ShowHTMLDialog(HtmlDialogUIDelegate* delegate, | 1148 gfx::NativeWindow BrowserView::ShowHTMLDialog(HtmlDialogUIDelegate* delegate, |
| 1149 gfx::NativeWindow parent_window) { | 1149 gfx::NativeWindow parent_window) { |
| 1150 // Default to using our window as the parent if the argument is not specified. | 1150 // Default to using our window as the parent if the argument is not specified. |
| 1151 gfx::NativeWindow parent = parent_window ? parent_window | 1151 gfx::NativeWindow parent = parent_window ? parent_window |
| 1152 : GetNativeHandle(); | 1152 : GetNativeHandle(); |
| 1153 #if defined(OS_CHROMEOS) | 1153 #if defined(OS_CHROMEOS) |
| 1154 parent = GetNormalBrowserWindowForBrowser(browser(), NULL); | 1154 parent = GetNormalBrowserWindowForBrowser(browser(), NULL); |
| 1155 #endif // defined(OS_CHROMEOS) | 1155 #endif // defined(OS_CHROMEOS) |
| 1156 | 1156 |
| 1157 browser::ShowHtmlDialog(parent, browser_.get()->profile(), delegate); | 1157 return browser::ShowHtmlDialog(parent, browser_.get()->profile(), delegate); |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 void BrowserView::ShowCreateWebAppShortcutsDialog( | 1160 void BrowserView::ShowCreateWebAppShortcutsDialog( |
| 1161 TabContentsWrapper* tab_contents) { | 1161 TabContentsWrapper* tab_contents) { |
| 1162 browser::ShowCreateWebAppShortcutsDialog(GetNativeHandle(), tab_contents); | 1162 browser::ShowCreateWebAppShortcutsDialog(GetNativeHandle(), tab_contents); |
| 1163 } | 1163 } |
| 1164 | 1164 |
| 1165 void BrowserView::ShowCreateChromeAppShortcutsDialog(Profile* profile, | 1165 void BrowserView::ShowCreateChromeAppShortcutsDialog(Profile* profile, |
| 1166 const Extension* app) { | 1166 const Extension* app) { |
| 1167 browser::ShowCreateChromeAppShortcutsDialog(GetNativeHandle(), profile, app); | 1167 browser::ShowCreateChromeAppShortcutsDialog(GetNativeHandle(), profile, app); |
| (...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2664 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2664 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2665 // Create the view and the frame. The frame will attach itself via the view | 2665 // Create the view and the frame. The frame will attach itself via the view |
| 2666 // so we don't need to do anything with the pointer. | 2666 // so we don't need to do anything with the pointer. |
| 2667 BrowserView* view = new BrowserView(browser); | 2667 BrowserView* view = new BrowserView(browser); |
| 2668 (new BrowserFrame(view))->InitBrowserFrame(); | 2668 (new BrowserFrame(view))->InitBrowserFrame(); |
| 2669 view->GetWidget()->non_client_view()->SetAccessibleName( | 2669 view->GetWidget()->non_client_view()->SetAccessibleName( |
| 2670 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2670 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| 2671 return view; | 2671 return view; |
| 2672 } | 2672 } |
| 2673 #endif | 2673 #endif |
| OLD | NEW |