diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-18 02:20:30 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-18 02:20:30 +0000 |
commit | ccd0226c79553e318657d6285c2feacebd105996 (patch) | |
tree | 0760118cbe4818320ad7afa2f0f06a8b6a132a9d /chrome/browser/renderer_host | |
parent | 20ce516dc41e836279baba3a214f1b4e4dbcc22d (diff) | |
download | chromium_src-ccd0226c79553e318657d6285c2feacebd105996.zip chromium_src-ccd0226c79553e318657d6285c2feacebd105996.tar.gz chromium_src-ccd0226c79553e318657d6285c2feacebd105996.tar.bz2 |
Don't allow more than one pending print dialog per browser instance.
As a future TODO, it might be nice to limit it per-tab instead of per-app.
BUG=46575
TEST=manual
Review URL: http://codereview.chromium.org/2848011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50203 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r-- | chrome/browser/renderer_host/resource_message_filter_gtk.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/resource_message_filter_gtk.cc b/chrome/browser/renderer_host/resource_message_filter_gtk.cc index c4b6530..56b53fe 100644 --- a/chrome/browser/renderer_host/resource_message_filter_gtk.cc +++ b/chrome/browser/renderer_host/resource_message_filter_gtk.cc @@ -193,8 +193,15 @@ void ResourceMessageFilter::DoOnAllocateTempFileForPrinting( temp_file_fd.fd = fd_in_browser = -1; temp_file_fd.auto_close = false; + bool allow_print = +#if defined(TOOLKIT_GTK) + !PrintDialogGtk::DialogShowing(); +#else + true; +#endif FilePath path; - if (file_util::CreateTemporaryFile(&path)) { + if (allow_print && + file_util::CreateTemporaryFile(&path)) { int fd = open(path.value().c_str(), O_WRONLY); if (fd >= 0) { FdMap* map = &Singleton<PrintingFileDescriptorMap>::get()->map; |