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

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

Issue 8357009: Print Preview Cleanup: Creating enum with all custom events used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renaming, nts 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/layout_settings.js
diff --git a/chrome/browser/resources/print_preview/layout_settings.js b/chrome/browser/resources/print_preview/layout_settings.js
index 1ef59bdee474beef5d83e00f8e0b39c97f3c222d..481c605a07d51bccd027f19d8ce17ccfb0d5a37b 100644
--- a/chrome/browser/resources/print_preview/layout_settings.js
+++ b/chrome/browser/resources/print_preview/layout_settings.js
@@ -69,13 +69,14 @@ cr.define('print_preview', function() {
addEventListeners_: function() {
this.landscapeRadioButton_.onclick = this.onLayoutButtonClick_.bind(this);
this.portraitRadioButton_.onclick = this.onLayoutButtonClick_.bind(this);
- document.addEventListener('PDFLoaded', this.onPDFLoaded_.bind(this));
- document.addEventListener('printerCapabilitiesUpdated',
+ document.addEventListener(customEvents.PDF_LOADED,
+ this.onPDFLoaded_.bind(this));
+ document.addEventListener(customEvents.PRINTER_CAPABILITIES_UPDATED,
this.onPrinterCapabilitiesUpdated_.bind(this));
},
/**
- * Listener triggered when a printerCapabilitiesUpdated event occurs.
+ * Executes when a |customEvents.PRINTER_CAPABILITIES_UPDATED| event occurs.
* @private
*/
onPrinterCapabilitiesUpdated_: function(e) {
@@ -95,7 +96,7 @@ cr.define('print_preview', function() {
},
/**
- * Listener executing when a PDFLoaded event occurs.
+ * Listener executing when a |customEvents.PDF_LOADED| event occurs.
* @private
*/
onPDFLoaded_: function() {

Powered by Google App Engine
This is Rietveld 408576698