Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4039)

Unified Diff: chrome/browser/resources/print_preview.js

Issue 7084012: Fixing behavior of print button when canceling print to pdf (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview.js
diff --git a/chrome/browser/resources/print_preview.js b/chrome/browser/resources/print_preview.js
index 0bb91592798d17702f4599d8b70922069db6ad5c..665fc402f758813f7a3950bed2b391dcdbe0c7fe 100644
--- a/chrome/browser/resources/print_preview.js
+++ b/chrome/browser/resources/print_preview.js
@@ -332,12 +332,11 @@ function getSelectedPrinterName() {
* Asks the browser to print the preview PDF based on current print settings.
*/
function printFile() {
- $('print-button').classList.add('loading');
- $('cancel-button').classList.add('loading');
- $('print-summary').innerHTML = localStrings.getString('printing');
- removeEventListeners();
-
if (getSelectedPrinterName() != PRINT_TO_PDF) {
+ $('print-button').classList.add('loading');
+ $('cancel-button').classList.add('loading');
+ $('print-summary').innerHTML = localStrings.getString('printing');
+ removeEventListeners();
window.setTimeout(function() { chrome.send('print', [getSettingsJSON()]); },
1000);
} else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698