Commit 6d6f102f authored by vitalybuka's avatar vitalybuka Committed by Commit bot

Get print preview intitiator before ClearInitiatorDetails().

BUG=407080

Review URL: https://codereview.chromium.org/473683005

Cr-Commit-Position: refs/heads/master@{#291836}
parent 7936233f
...@@ -834,6 +834,7 @@ void PrintPreviewHandler::HandlePrint(const base::ListValue* args) { ...@@ -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 // Do this so the initiator can open a new print preview dialog, while the
// current print preview dialog is still handling its print job. // current print preview dialog is still handling its print job.
WebContents* initiator = GetInitiator();
ClearInitiatorDetails(); ClearInitiatorDetails();
// The PDF being printed contains only the pages that the user selected, // The PDF being printed contains only the pages that the user selected,
...@@ -853,7 +854,6 @@ void PrintPreviewHandler::HandlePrint(const base::ListValue* args) { ...@@ -853,7 +854,6 @@ void PrintPreviewHandler::HandlePrint(const base::ListValue* args) {
// printing has finished. Then the dialog closes and PrintPreviewDone() gets // printing has finished. Then the dialog closes and PrintPreviewDone() gets
// called. In the case below, since the preview dialog will be hidden and // called. In the case below, since the preview dialog will be hidden and
// not closed, we need to make this call. // not closed, we need to make this call.
WebContents* initiator = GetInitiator();
if (initiator) { if (initiator) {
printing::PrintViewManager* print_view_manager = printing::PrintViewManager* print_view_manager =
printing::PrintViewManager::FromWebContents(initiator); printing::PrintViewManager::FromWebContents(initiator);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment