Chromium Code Reviews| Index: chrome/browser/resources/print_preview.js |
| diff --git a/chrome/browser/resources/print_preview.js b/chrome/browser/resources/print_preview.js |
| index b88c70d775f456ead5bd98d576b7651e1ee00a77..49aaaee373dd80218ccdeab4ce602d8a9d68ccd4 100644 |
| --- a/chrome/browser/resources/print_preview.js |
| +++ b/chrome/browser/resources/print_preview.js |
| @@ -492,9 +492,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. |
|
Lei Zhang
2011/05/27 17:26:53
nit: can you just call this "previewUid" here and
kmadhusu
2011/05/27 23:44:42
Done.
|
| */ |
| -function updatePrintPreview(pageCount, jobTitle, modifiable) { |
| +function updatePrintPreview(pageCount, jobTitle, modifiable, previewUIId) { |
| var tempPrintSettings = new PrintSettings(); |
| tempPrintSettings.save(); |
| @@ -528,7 +528,7 @@ function updatePrintPreview(pageCount, jobTitle, modifiable) { |
| // Update the current tab title. |
| document.title = localStrings.getStringF('printPreviewTitleFormat', jobTitle); |
| - createPDFPlugin(); |
| + createPDFPlugin(previewUIId); |
| updatePrintSummary(); |
| updatePrintButtonState(); |
| addEventListeners(); |
| @@ -536,8 +536,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; |
| @@ -560,7 +561,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); |
|
Lei Zhang
2011/05/27 17:26:53
I thought we were going to do chrome://print/print
kmadhusu
2011/05/27 23:44:42
(repeating our in-person conversation) There is no
|
| var mainView = $('mainview'); |
| mainView.appendChild(pdfPlugin); |
| pdfPlugin.onload('onPDFLoad()'); |