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

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: Adding documentation 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..364a371ca5e9e0e63a8281c4fbc134d613561777 100644
--- a/chrome/browser/resources/print_preview/print_header.js
+++ b/chrome/browser/resources/print_preview/print_header.js
@@ -50,6 +50,15 @@ cr.define('print_preview', function() {
this.updatePrintButton_.bind(this));
document.addEventListener('disableCancelButton',
this.disableCancelButton.bind(this));
+ document.addEventListener('errorOccurred',
+ this.onErrorOccurred.bind(this));
+ },
+
+ /**
+ * Executes when an |errorOccured| event is occurs.
+ */
+ onErrorOccurred: function() {
+ this.printButton_.disabled = true;
},
/**

Powered by Google App Engine
This is Rietveld 408576698