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

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

Issue 8343017: Print Preview: Hiding margins UI if an error occurs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 years, 2 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
Index: chrome/browser/resources/print_preview/print_header.js
diff --git a/chrome/browser/resources/print_preview/print_header.js b/chrome/browser/resources/print_preview/print_header.js
index 593b0989d1db05f77cf9077c74f9d868fc15aa73..c73c9ae7d12557d675ba9b69a11bd16a41f131bb 100644
--- a/chrome/browser/resources/print_preview/print_header.js
+++ b/chrome/browser/resources/print_preview/print_header.js
@@ -50,6 +50,16 @@ cr.define('print_preview', function() {
this.updatePrintButton_.bind(this));
document.addEventListener('disableCancelButton',
this.disableCancelButton.bind(this));
+ document.addEventListener('PDFGenerationError',
+ this.onPDFGenerationError_.bind(this));
+ },
+
+ /**
+ * Executes when an |PDFGenerationError| event is occurs.
+ * @private
+ */
+ onPDFGenerationError_: function() {
+ this.printButton_.disabled = true;
},
/**
« no previous file with comments | « chrome/browser/resources/print_preview/preview_area.js ('k') | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698