Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5763)

Unified Diff: chrome/browser/printing/print_dialog_cloud.cc

Issue 10171006: Convert more users away from DOMView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/printing/print_dialog_cloud.cc
===================================================================
--- chrome/browser/printing/print_dialog_cloud.cc (revision 133279)
+++ chrome/browser/printing/print_dialog_cloud.cc (working copy)
@@ -21,6 +21,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/dialog_style.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_switches.h"
@@ -688,45 +689,27 @@
path_to_file, width, height, std::string(), job_title, print_ticket,
file_type, modal, delete_on_close, close_after_signin,
callback);
- if (modal) {
- DCHECK(browser);
-#if defined(USE_AURA)
- HtmlDialogView* html_view =
- new HtmlDialogView(profile, browser, dialog_delegate);
- views::Widget::CreateWindowWithParent(html_view,
- browser->window()->GetNativeHandle());
- html_view->InitDialog();
- views::Widget* widget = html_view->GetWidget();
- DCHECK(widget);
- widget->Show();
#if defined(OS_WIN)
sky 2012/04/20 22:59:37 Oy, what an ifdef soup.
Albert Bodenhamer 2012/04/21 00:19:48 Yep. The joys of needing to hack window focus on
- gfx::NativeWindow window = widget->GetNativeWindow();
+ gfx::NativeWindow window =
#endif
-#else
+ browser::ShowHtmlDialog(
+ modal ? browser->window()->GetNativeHandle() : NULL,
+ profile,
+ browser,
+ dialog_delegate,
+ STYLE_GENERIC);
+
#if defined(OS_WIN)
- gfx::NativeWindow window =
-#endif
- browser->BrowserShowHtmlDialog(dialog_delegate, NULL, STYLE_GENERIC);
-#endif
-#if defined(OS_WIN)
HWND dialog_handle;
#if defined(USE_AURA)
dialog_handle = window->GetRootWindow()->GetAcceleratedWidget();
#else
dialog_handle = window;
#endif
- if (::GetForegroundWindow() != dialog_handle) {
+ if (::GetForegroundWindow() != dialog_handle)
ui::ForegroundHelper::SetForeground(dialog_handle);
- }
#endif
- } else {
- browser::ShowHtmlDialog(NULL,
- profile,
- browser,
- dialog_delegate,
- STYLE_GENERIC);
- }
}
void CreateDialogSigninImpl(const base::Closure& callback) {

Powered by Google App Engine
This is Rietveld 408576698