| Index: chrome/browser/resources/print_preview/header_footer_settings.js
|
| diff --git a/chrome/browser/resources/print_preview/header_footer_settings.js b/chrome/browser/resources/print_preview/header_footer_settings.js
|
| index 02776c58b86b8e351e8924dd57ebe07423b36e74..b9823a3203c16dcbf9dc4d709abcafa72027f7f8 100644
|
| --- a/chrome/browser/resources/print_preview/header_footer_settings.js
|
| +++ b/chrome/browser/resources/print_preview/header_footer_settings.js
|
| @@ -13,7 +13,6 @@ cr.define('print_preview', function() {
|
| function HeaderFooterSettings() {
|
| this.headerFooterOption_ = $('header-footer-option');
|
| this.headerFooterCheckbox_ = $('header-footer');
|
| - this.headerFooterApplies_ = false;
|
| this.addEventListeners_();
|
| }
|
|
|
| @@ -33,7 +32,7 @@ cr.define('print_preview', function() {
|
| * @return {boolean} true if Headers and Footers are checked.
|
| */
|
| hasHeaderFooter: function() {
|
| - return this.headerFooterApplies_ && this.headerFooterCheckbox_.checked;
|
| + return previewModifiable && this.headerFooterCheckbox_.checked;
|
| },
|
|
|
| /**
|
| @@ -54,14 +53,6 @@ cr.define('print_preview', function() {
|
| this.onHeaderFooterChanged_.bind(this);
|
| document.addEventListener(customEvents.PDF_LOADED,
|
| this.onPDFLoaded_.bind(this));
|
| - document.addEventListener(customEvents.MARGINS_SELECTION_CHANGED,
|
| - this.onMarginsSelectionChanged_.bind(this));
|
| - },
|
| -
|
| - onMarginsSelectionChanged_: function(event) {
|
| - this.headerFooterApplies_ = event.selectedMargins !=
|
| - print_preview.MarginSettings.MARGINS_VALUE_NO_MARGINS;
|
| - this.setVisible_(this.headerFooterApplies_);
|
| },
|
|
|
| /**
|
| @@ -79,16 +70,15 @@ cr.define('print_preview', function() {
|
| */
|
| onPDFLoaded_: function() {
|
| if (!previewModifiable)
|
| - this.setVisible_(false);
|
| + this.setVisible(false);
|
| },
|
|
|
| /**
|
| * Hides or shows |this.headerFooterOption|.
|
| * @param {boolean} visible True if |this.headerFooterOption| should be
|
| * shown.
|
| - * @private
|
| */
|
| - setVisible_: function(visible) {
|
| + setVisible: function(visible) {
|
| if (visible)
|
| fadeInOption(this.headerFooterOption_);
|
| else
|
|
|