| Index: chrome/browser/resources/print_preview.js
|
| diff --git a/chrome/browser/resources/print_preview.js b/chrome/browser/resources/print_preview.js
|
| index b91cf2e83b1855592814a620d870ae49ac66f36a..572c37f6d1dfb07a604e4c54504d69eed3990128 100644
|
| --- a/chrome/browser/resources/print_preview.js
|
| +++ b/chrome/browser/resources/print_preview.js
|
| @@ -493,9 +493,9 @@ function onPDFLoad() {
|
| * @param {number} pageCount The expected total pages count.
|
| * @param {string} jobTitle The print job title.
|
| * @param {boolean} modifiable If the preview is modifiable.
|
| - *
|
| + * @param {string} previewUIId Preview UI identifier.
|
| */
|
| -function updatePrintPreview(pageCount, jobTitle, modifiable) {
|
| +function updatePrintPreview(pageCount, jobTitle, modifiable, previewUIId) {
|
| var tempPrintSettings = new PrintSettings();
|
| tempPrintSettings.save();
|
|
|
| @@ -529,7 +529,7 @@ function updatePrintPreview(pageCount, jobTitle, modifiable) {
|
| // Update the current tab title.
|
| document.title = localStrings.getStringF('printPreviewTitleFormat', jobTitle);
|
|
|
| - createPDFPlugin();
|
| + createPDFPlugin(previewUIId);
|
| updatePrintSummary();
|
| updatePrintButtonState();
|
| addEventListeners();
|
| @@ -537,8 +537,9 @@ function updatePrintPreview(pageCount, jobTitle, modifiable) {
|
|
|
| /**
|
| * Create the PDF plugin or reload the existing one.
|
| + * @param {string} previewUIId Preview UI identifier.
|
| */
|
| -function createPDFPlugin() {
|
| +function createPDFPlugin(previewUIId) {
|
| // Enable the print button.
|
| if (!$('printer-list').disabled) {
|
| $('print-button').disabled = false;
|
| @@ -561,7 +562,7 @@ function createPDFPlugin() {
|
| var pdfPlugin = document.createElement('embed');
|
| pdfPlugin.setAttribute('id', 'pdf-viewer');
|
| pdfPlugin.setAttribute('type', 'application/pdf');
|
| - pdfPlugin.setAttribute('src', 'chrome://print/print.pdf');
|
| + pdfPlugin.setAttribute('src', 'chrome://print/print.pdf/' + previewUIId);
|
| var mainView = $('mainview');
|
| mainView.appendChild(pdfPlugin);
|
| pdfPlugin.onload('onPDFLoad()');
|
|
|