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

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

Issue 473683005: Get print preview intitiator before ClearInitiatorDetails(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patches
Patch Set: Created 6 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/print_preview_handler.cc
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index 3af956229def3b91ef828cc303cf3f21c40cda11..f95cabfbcdd7a08177d14f8b3ed7687d53daf521 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -834,6 +834,7 @@ void PrintPreviewHandler::HandlePrint(const base::ListValue* args) {
// Do this so the initiator can open a new print preview dialog, while the
// current print preview dialog is still handling its print job.
+ WebContents* initiator = GetInitiator();
ClearInitiatorDetails();
// The PDF being printed contains only the pages that the user selected,
@@ -853,7 +854,6 @@ void PrintPreviewHandler::HandlePrint(const base::ListValue* args) {
// printing has finished. Then the dialog closes and PrintPreviewDone() gets
// called. In the case below, since the preview dialog will be hidden and
// not closed, we need to make this call.
- WebContents* initiator = GetInitiator();
if (initiator) {
printing::PrintViewManager* print_view_manager =
printing::PrintViewManager::FromWebContents(initiator);
« 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