Fix print job early termination during PDF conversion (M65)

Many webpages use window.print() immediately followed by window.close()
in JS. This means that the renderer and web contents are torn down
while the PDF is still being converted for the printer on Windows.
However, the web contents are not needed if the full PDF document has
already been rendered, so the PrintViewManager should just release the
query and allow conversion and spooling to complete instead of
cancelling the job.

The CL to send the Print Preview PDF directly to the PrintViewManager
broke this for users that use Print Preview because we no longer store an
extra copy of the web contents in the BackgroundPrintingManager. This has
been broken if using the system dialog since M64 or earlier.

(cherry picked from commit d20e4ef32233412d947beeb190f93ccea71510b3)

Bug: 820105
Change-Id: I308adba43b3604509275f6c0f2946545b94dd1d5
Reviewed-on: https://chromium-review.googlesource.com/956257
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Wei Li <weili@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#542203}
TBR: weili@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/959449
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#694}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
3 files changed