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

Unified Diff: chrome/browser/resources/print_preview/preview_area.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: Addressing 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/preview_area.js
diff --git a/chrome/browser/resources/print_preview/preview_area.js b/chrome/browser/resources/print_preview/preview_area.js
index 720600fda5a52f8e3c94a900358941e803ba5276..3a86cefac7d2ab132693e655127a022bd3ab005d 100644
--- a/chrome/browser/resources/print_preview/preview_area.js
+++ b/chrome/browser/resources/print_preview/preview_area.js
@@ -134,12 +134,12 @@ cr.define('print_preview', function() {
* @private
*/
addEventListeners_: function() {
- document.addEventListener('PDFLoaded',
+ document.addEventListener(customEvents.PDF_LOADED,
this.onPDFLoaded_.bind(this));
},
/**
- * Listener executing when a PDFLoaded event occurs.
+ * Listener executing when a |customEvents.PDF_LOADED| event occurs.
* @private
*/
onPDFLoaded_: function() {
@@ -208,7 +208,7 @@ cr.define('print_preview', function() {
$('mainview').removeChild(this.pdfPlugin_);
this.pdfPlugin_ = null;
}
- cr.dispatchSimpleEvent(document, 'PDFGenerationError');
+ cr.dispatchSimpleEvent(document, customEvents.PDF_GENERATION_ERROR);
},
/**

Powered by Google App Engine
This is Rietveld 408576698