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

Unified Diff: chrome/browser/ui/webui/print_preview_handler.cc

Issue 7761014: Print Preview: Fix activating the initiator tab when printing. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_handler.cc
===================================================================
--- chrome/browser/ui/webui/print_preview_handler.cc (revision 98459)
+++ chrome/browser/ui/webui/print_preview_handler.cc (working copy)
@@ -579,14 +579,18 @@
SelectFile(default_filename);
} else {
- ClearInitiatorTabDetails();
ReportPrintSettingsStats(*settings);
ReportUserActionHistogram(PRINT_TO_PRINTER);
UMA_HISTOGRAM_COUNTS("PrintPreview.PageCount.PrintToPrinter",
GetPageCountFromSettingsDictionary(*settings));
+ // This tries to activate the initiator tab as well, so do not clear the
+ // association with the initiator tab yet.
HidePreviewTab();
+ // Do this so the initiator tab can open a new print preview tab.
+ ClearInitiatorTabDetails();
+
// The PDF being printed contains only the pages that the user selected,
// so ignore the page range and print all pages.
settings->Remove(printing::kSettingPageRange, NULL);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698