diff options
author | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-17 17:16:04 +0000 |
---|---|---|
committer | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-17 17:16:04 +0000 |
commit | af764826943765890a0f4e98456393189ce1d6d1 (patch) | |
tree | af39e6d7e18d116f5dca650f4e106a52c9614a39 /chrome/browser/resources/print_preview/print_header.js | |
parent | 2a231675747bdf33b55c7d5fccda3b348b0f185b (diff) | |
download | chromium_src-af764826943765890a0f4e98456393189ce1d6d1.zip chromium_src-af764826943765890a0f4e98456393189ce1d6d1.tar.gz chromium_src-af764826943765890a0f4e98456393189ce1d6d1.tar.bz2 |
Print Preview: Cleanup: Moving registration of event listeners within the costructors of all settings objects.
BUG=NONE
TEST=Print preview still works.
Review URL: http://codereview.chromium.org/8302004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105830 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/print_preview/print_header.js')
-rw-r--r-- | chrome/browser/resources/print_preview/print_header.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/resources/print_preview/print_header.js b/chrome/browser/resources/print_preview/print_header.js index 92bf086..5074705 100644 --- a/chrome/browser/resources/print_preview/print_header.js +++ b/chrome/browser/resources/print_preview/print_header.js @@ -15,6 +15,7 @@ cr.define('print_preview', function() { this.cancelButton_ = $('cancel-button'); this.summary_ = $('print-summary'); this.printButton_.focus(); + this.addEventListeners_(); } cr.addSingletonGetter(PrintHeader); @@ -35,8 +36,9 @@ cr.define('print_preview', function() { /** * Adding event listeners where necessary. Listeners take care of changing * their behavior depending on the current state, no need to remove them. + * @private */ - addEventListeners: function() { + addEventListeners_: function() { this.cancelButton_.onclick = function() { this.disableCancelButton(); closePrintPreviewTab(); |