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

Unified Diff: printing/printing_context_win.cc

Issue 1997016: Set the job name for the print job on the Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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
« printing/printing_context_mac.mm ('K') | « printing/printing_context_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printing_context_win.cc
===================================================================
--- printing/printing_context_win.cc (revision 47035)
+++ printing/printing_context_win.cc (working copy)
@@ -152,12 +152,21 @@
}
PrintingContext::Result PrintingContext::AskUserForSettings(
- HWND window,
+ HWND view,
int max_pages,
bool has_selection) {
- DCHECK(window);
DCHECK(!in_print_job_);
dialog_box_dismissed_ = false;
+
+ HWND window;
+ if (!view || !IsWindow(view)) {
+ // TODO(maruel): bug 1214347 Get the right browser window instead.
+ window = GetDesktopWindow();
+ } else {
+ window = GetAncestor(view, GA_ROOTOWNER);
+ }
+ DCHECK(window);
+
// Show the OS-dependent dialog box.
// If the user press
// - OK, the settings are reset and reinitialized with the new settings. OK is
« printing/printing_context_mac.mm ('K') | « printing/printing_context_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698