diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-13 17:04:31 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-13 17:04:31 +0000 |
commit | f487ac255f512041852d1569272a4ad2bff2a78a (patch) | |
tree | 34bfe0692f6ec04402e27a7d98a7bee00e873390 /printing/printing_context_win.h | |
parent | 04af2789c7c7691211d629255dbdd63e2c50c678 (diff) | |
download | chromium_src-f487ac255f512041852d1569272a4ad2bff2a78a.zip chromium_src-f487ac255f512041852d1569272a4ad2bff2a78a.tar.gz chromium_src-f487ac255f512041852d1569272a4ad2bff2a78a.tar.bz2 |
Revert 230235 "Use BaseShellDialog for print dialog on Windows"
Per discussion with ananta, opening a system modal dialog from a
background thread is a bad idea, so reverting this (from long ago).
Windows doesn't preserve the order correctly when the window is not on
the main UI thread, and in the bug here, it interacts very badly with
the IME toolbar window, causing the modal print dialog to go behind the
browser window in Z order making chrome appear to be hung.
The original goal was to fix tasks not being dispatched while the dialog
was open. We can instead use the ScopedNestedTaskAllower as we've done
for other system modal dialogs which I'll do in a separate CL.
BUG=342697,180997
> Use BaseShellDialog for print dialog on Windows
>
> This puts the print dialog on a background thread which is necessary so other
> top level windows can keep painting as Aura does the compositor swaps on the
> UI thread.
>
> R=sky@chromium.org,vitalybuka@chromium.org
>
>
> Review URL: https://codereview.chromium.org/27441003
TBR=scottmg@chromium.org,sky@chromium.org,vitalybuka@chromium.org,ananta@chromium.org
Review URL: https://codereview.chromium.org/164013002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251066 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/printing_context_win.h')
-rw-r--r-- | printing/printing_context_win.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/printing/printing_context_win.h b/printing/printing_context_win.h index 3be4917..d0cd2fb 100644 --- a/printing/printing_context_win.h +++ b/printing/printing_context_win.h @@ -14,13 +14,10 @@ #include "build/build_config.h" #include "printing/printing_context.h" #include "ui/gfx/native_widget_types.h" -#include "ui/shell_dialogs/print_settings_dialog_win.h" namespace printing { -class PRINTING_EXPORT PrintingContextWin - : public PrintingContext, - public ui::PrintSettingsDialogWin::Observer { +class PRINTING_EXPORT PrintingContextWin : public PrintingContext { public: explicit PrintingContextWin(const std::string& app_locale); ~PrintingContextWin(); @@ -43,10 +40,6 @@ class PRINTING_EXPORT PrintingContextWin virtual void ReleaseContext() OVERRIDE; virtual gfx::NativeDrawingContext context() const OVERRIDE; - // PrintSettingsDialogWin::Observer implementation: - virtual void PrintSettingsConfirmed(PRINTDLGEX* dialog_options) OVERRIDE; - virtual void PrintSettingsCancelled(PRINTDLGEX* dialog_options) OVERRIDE; - #if defined(UNIT_TEST) || defined(PRINTING_IMPLEMENTATION) // Sets a fake PrintDlgEx function pointer in tests. void SetPrintDialog(HRESULT (__stdcall *print_dialog_func)(LPPRINTDLGEX)) { @@ -94,12 +87,6 @@ class PRINTING_EXPORT PrintingContextWin // SetPrintDialog() in tests. HRESULT (__stdcall *print_dialog_func_)(LPPRINTDLGEX); - // Where to notify when the dialog is closed. - PrintSettingsCallback callback_; - - // Wrapper around native print dialog that runs it on a background thread. - scoped_refptr<ui::PrintSettingsDialogWin> print_settings_dialog_; - DISALLOW_COPY_AND_ASSIGN(PrintingContextWin); }; |