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

Unified Diff: chrome/browser/resources/print_preview/copies_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/copies_settings.js
diff --git a/chrome/browser/resources/print_preview/copies_settings.js b/chrome/browser/resources/print_preview/copies_settings.js
index 1b2c1bc6ad3efcb80339f4b135cbd54eb6e4cad2..15f12fe58c7c2c25f77152bc30024f788e4b83a2 100644
--- a/chrome/browser/resources/print_preview/copies_settings.js
+++ b/chrome/browser/resources/print_preview/copies_settings.js
@@ -118,8 +118,8 @@ cr.define('print_preview', function() {
this.showHideCollateOption_();
if (!hasPendingPreviewRequest) {
- cr.dispatchSimpleEvent(document, 'updateSummary');
- cr.dispatchSimpleEvent(document, 'updatePrintButton');
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_SUMMARY);
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_PRINT_BUTTON);
}
},
@@ -132,8 +132,8 @@ cr.define('print_preview', function() {
this.updateButtonsState_();
this.showHideCollateOption_();
if (!hasPendingPreviewRequest) {
- cr.dispatchSimpleEvent(document, 'updateSummary');
- cr.dispatchSimpleEvent(document, 'updatePrintButton');
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_SUMMARY);
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_PRINT_BUTTON);
}
},
@@ -148,16 +148,16 @@ cr.define('print_preview', function() {
this.decrementButton_.onclick = this.onDecrementButtonClicked_.bind(this);
this.twoSidedCheckbox_.onclick = function() {
if (!hasPendingPreviewRequest)
- cr.dispatchSimpleEvent(document, 'updateSummary');
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_SUMMARY);
}
- document.addEventListener('PDFLoaded',
+ document.addEventListener(customEvents.PDF_LOADED,
this.updateButtonsState_.bind(this));
- document.addEventListener('printerCapabilitiesUpdated',
+ 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) {

Powered by Google App Engine
This is Rietveld 408576698