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

Unified Diff: chrome/browser/resources/print_preview/margin_textbox.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: Rebasing 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/margin_textbox.js
diff --git a/chrome/browser/resources/print_preview/margin_textbox.js b/chrome/browser/resources/print_preview/margin_textbox.js
index 3f3e80d344a6c800888498f13df1fba3358a1be7..7132ae0798dc7fe24cf07e793ac0d199bcf5f8aa 100644
--- a/chrome/browser/resources/print_preview/margin_textbox.js
+++ b/chrome/browser/resources/print_preview/margin_textbox.js
@@ -148,9 +148,9 @@ cr.define('print_preview', function() {
}
this.updateColor();
- cr.dispatchSimpleEvent(document, 'updateSummary');
- cr.dispatchSimpleEvent(document, 'updatePrintButton');
- cr.dispatchSimpleEvent(this, 'MarginsMayHaveChanged');
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_SUMMARY);
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_PRINT_BUTTON);
+ cr.dispatchSimpleEvent(this, customEvents.MARGINS_MAY_HAVE_CHANGED);
},
/**
@@ -176,8 +176,8 @@ cr.define('print_preview', function() {
this.setValue_(this.lastValidValueInPoints);
this.validate();
this.updateColor();
- cr.dispatchSimpleEvent(document, 'updateSummary');
- cr.dispatchSimpleEvent(document, 'updatePrintButton');
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_SUMMARY);
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_PRINT_BUTTON);
}
},
@@ -199,12 +199,12 @@ cr.define('print_preview', function() {
onTextValueMayHaveChanged: function() {
this.validate();
this.updateColor();
- cr.dispatchSimpleEvent(document, 'updateSummary');
- cr.dispatchSimpleEvent(document, 'updatePrintButton');
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_SUMMARY);
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_PRINT_BUTTON);
if (!this.isValid)
return;
- cr.dispatchSimpleEvent(this, 'MarginsMayHaveChanged');
+ cr.dispatchSimpleEvent(this, customEvents.MARGINS_MAY_HAVE_CHANGED);
}
};

Powered by Google App Engine
This is Rietveld 408576698