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 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "chrome/browser/views/frame/browser_view_layout.h" | 46 #include "chrome/browser/views/frame/browser_view_layout.h" |
47 #include "chrome/browser/views/frame/contents_container.h" | 47 #include "chrome/browser/views/frame/contents_container.h" |
48 #include "chrome/browser/views/fullscreen_exit_bubble.h" | 48 #include "chrome/browser/views/fullscreen_exit_bubble.h" |
49 #include "chrome/browser/views/status_bubble_views.h" | 49 #include "chrome/browser/views/status_bubble_views.h" |
50 #include "chrome/browser/views/tab_contents/tab_contents_container.h" | 50 #include "chrome/browser/views/tab_contents/tab_contents_container.h" |
51 #include "chrome/browser/views/tabs/browser_tab_strip_controller.h" | 51 #include "chrome/browser/views/tabs/browser_tab_strip_controller.h" |
52 #include "chrome/browser/views/tabs/side_tab_strip.h" | 52 #include "chrome/browser/views/tabs/side_tab_strip.h" |
53 #include "chrome/browser/views/theme_install_bubble_view.h" | 53 #include "chrome/browser/views/theme_install_bubble_view.h" |
54 #include "chrome/browser/views/toolbar_view.h" | 54 #include "chrome/browser/views/toolbar_view.h" |
55 #include "chrome/browser/views/update_recommended_message_box.h" | 55 #include "chrome/browser/views/update_recommended_message_box.h" |
| 56 #include "chrome/browser/views/window.h" |
56 #include "chrome/browser/window_sizer.h" | 57 #include "chrome/browser/window_sizer.h" |
57 #include "chrome/browser/wrench_menu_model.h" | 58 #include "chrome/browser/wrench_menu_model.h" |
58 #include "chrome/common/chrome_switches.h" | 59 #include "chrome/common/chrome_switches.h" |
59 #include "chrome/common/extensions/extension_resource.h" | 60 #include "chrome/common/extensions/extension_resource.h" |
60 #include "chrome/common/native_window_notification_source.h" | 61 #include "chrome/common/native_window_notification_source.h" |
61 #include "chrome/common/notification_service.h" | 62 #include "chrome/common/notification_service.h" |
62 #include "chrome/common/pref_names.h" | 63 #include "chrome/common/pref_names.h" |
63 #include "chrome/common/url_constants.h" | 64 #include "chrome/common/url_constants.h" |
64 #include "gfx/canvas_skia.h" | 65 #include "gfx/canvas_skia.h" |
65 #include "grit/app_resources.h" | 66 #include "grit/app_resources.h" |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 void BrowserView::ShowThemeInstallBubble() { | 1157 void BrowserView::ShowThemeInstallBubble() { |
1157 TabContents* tab_contents = browser_->GetSelectedTabContents(); | 1158 TabContents* tab_contents = browser_->GetSelectedTabContents(); |
1158 if (!tab_contents) | 1159 if (!tab_contents) |
1159 return; | 1160 return; |
1160 ThemeInstallBubbleView::Show(tab_contents); | 1161 ThemeInstallBubbleView::Show(tab_contents); |
1161 } | 1162 } |
1162 | 1163 |
1163 void BrowserView::ConfirmBrowserCloseWithPendingDownloads() { | 1164 void BrowserView::ConfirmBrowserCloseWithPendingDownloads() { |
1164 DownloadInProgressConfirmDialogDelegate* delegate = | 1165 DownloadInProgressConfirmDialogDelegate* delegate = |
1165 new DownloadInProgressConfirmDialogDelegate(browser_.get()); | 1166 new DownloadInProgressConfirmDialogDelegate(browser_.get()); |
1166 views::Window::CreateChromeWindow(GetNativeHandle(), gfx::Rect(), | 1167 browser::CreateViewsWindow(GetNativeHandle(), gfx::Rect(), |
1167 delegate)->Show(); | 1168 delegate)->Show(); |
1168 } | 1169 } |
1169 | 1170 |
1170 void BrowserView::ShowHTMLDialog(HtmlDialogUIDelegate* delegate, | 1171 void BrowserView::ShowHTMLDialog(HtmlDialogUIDelegate* delegate, |
1171 gfx::NativeWindow parent_window) { | 1172 gfx::NativeWindow parent_window) { |
1172 // Default to using our window as the parent if the argument is not specified. | 1173 // Default to using our window as the parent if the argument is not specified. |
1173 gfx::NativeWindow parent = parent_window ? parent_window | 1174 gfx::NativeWindow parent = parent_window ? parent_window |
1174 : GetNativeHandle(); | 1175 : GetNativeHandle(); |
1175 #if defined(OS_CHROMEOS) | 1176 #if defined(OS_CHROMEOS) |
1176 parent = GetNormalBrowserWindowForBrowser(browser(), NULL); | 1177 parent = GetNormalBrowserWindowForBrowser(browser(), NULL); |
1177 #endif // defined(OS_CHROMEOS) | 1178 #endif // defined(OS_CHROMEOS) |
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2454 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); | 2455 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); |
2455 | 2456 |
2456 return view; | 2457 return view; |
2457 } | 2458 } |
2458 #endif | 2459 #endif |
2459 | 2460 |
2460 // static | 2461 // static |
2461 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2462 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2462 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2463 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2463 } | 2464 } |
OLD | NEW |