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

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

Issue 10204002: Revert 133467 - Convert the last users of DOMView to WebView. (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
« no previous file with comments | « chrome/browser/chromeos/sim_dialog_delegate.cc ('k') | chrome/browser/ui/views/dom_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_dialog_cloud.cc
===================================================================
--- chrome/browser/printing/print_dialog_cloud.cc (revision 133528)
+++ chrome/browser/printing/print_dialog_cloud.cc (working copy)
@@ -21,7 +21,6 @@
#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"
@@ -689,27 +688,45 @@
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)
- gfx::NativeWindow window =
+ gfx::NativeWindow window = widget->GetNativeWindow();
#endif
- browser::ShowHtmlDialog(
- modal ? browser->window()->GetNativeHandle() : NULL,
- profile,
- browser,
- dialog_delegate,
- STYLE_GENERIC);
-
+#else
#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) {
« no previous file with comments | « chrome/browser/chromeos/sim_dialog_delegate.cc ('k') | chrome/browser/ui/views/dom_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698