Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Bring back print dialog and also fix the crash issue in
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Feb 28, 2017
1 parent 4a5fe63 commit dcbdf36
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion atom/browser/api/atom_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,13 @@ void WebContents::Print(mate::Arguments* args) {
return;
}

printing::StartBasicPrint(web_contents());
content::RenderFrameHost* rfh_to_use =
printing::GetFrameToPrint(web_contents());
if (!rfh_to_use)
return;

printing::PrintViewManagerBasic::FromWebContents(web_contents())->
PrintNow(rfh_to_use);
}

void WebContents::PrintToPDF(const base::DictionaryValue& setting,
Expand Down

0 comments on commit dcbdf36

Please sign in to comment.