Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var localStrings = new LocalStrings(); | 5 var localStrings = new LocalStrings(); |
| 6 var hasPDFPlugin = true; | 6 var hasPDFPlugin = true; |
| 7 var expectedPageCount = 0; | 7 var expectedPageCount = 0; |
| 8 var pageRangesInfo = []; | 8 var pageRangesInfo = []; |
| 9 var printJobTitle = ''; | 9 var printJobTitle = ''; |
| 10 | 10 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 var printToPDF = (printerName == localStrings.getString('printToPDF')); | 198 var printToPDF = (printerName == localStrings.getString('printToPDF')); |
| 199 | 199 |
| 200 return JSON.stringify({'printerName': printerName, | 200 return JSON.stringify({'printerName': printerName, |
| 201 'pageRange': pageRangesInfo, | 201 'pageRange': pageRangesInfo, |
| 202 'printAll': printAll, | 202 'printAll': printAll, |
| 203 'twoSided': twoSided, | 203 'twoSided': twoSided, |
| 204 'copies': copies, | 204 'copies': copies, |
| 205 'collate': collate, | 205 'collate': collate, |
| 206 'landscape': landscape, | 206 'landscape': landscape, |
| 207 'color': color, | 207 'color': color, |
| 208 'printToPDF': printToPDF}); | 208 'printToPDF': printToPDF, |
| 209 'printJobTitle': printJobTitle}); | |
|
Lei Zhang
2011/04/01 01:05:35
I actually want to get rid of printJobTitle altoge
| |
| 209 } | 210 } |
| 210 | 211 |
| 211 /** | 212 /** |
| 212 * Asks the browser to print the preview PDF based on current print settings. | 213 * Asks the browser to print the preview PDF based on current print settings. |
| 213 */ | 214 */ |
| 214 function printFile() { | 215 function printFile() { |
| 215 chrome.send('print', [getSettingsJSON()]); | 216 chrome.send('print', [getSettingsJSON()]); |
| 216 } | 217 } |
| 217 | 218 |
| 218 /** | 219 /** |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 377 * Depending on the validity of 'copies' value, enables/disables the print | 378 * Depending on the validity of 'copies' value, enables/disables the print |
| 378 * button. | 379 * button. |
| 379 */ | 380 */ |
| 380 function updatePrintButtonState() { | 381 function updatePrintButtonState() { |
| 381 $('print-button').disabled = (!($('all-pages').checked || | 382 $('print-button').disabled = (!($('all-pages').checked || |
| 382 $('pages').checkValidity()) || | 383 $('pages').checkValidity()) || |
| 383 !$('copies').checkValidity()); | 384 !$('copies').checkValidity()); |
| 384 } | 385 } |
| 385 | 386 |
| 386 window.addEventListener('DOMContentLoaded', load); | 387 window.addEventListener('DOMContentLoaded', load); |
| OLD | NEW |