Chromium Code Reviews| Index: chrome/browser/resources/print_preview/settings/other_options_settings.js |
| diff --git a/chrome/browser/resources/print_preview/settings/other_options_settings.js b/chrome/browser/resources/print_preview/settings/other_options_settings.js |
| index dd8a3fde574580ca9e320380906c76beea715658..bce08accc87bd54dfd06c0a8e761d152ece8e13c 100644 |
| --- a/chrome/browser/resources/print_preview/settings/other_options_settings.js |
| +++ b/chrome/browser/resources/print_preview/settings/other_options_settings.js |
| @@ -161,43 +161,43 @@ cr.define('print_preview', function() { |
| enterDocument: function() { |
| print_preview.SettingsSection.prototype.enterDocument.call(this); |
| this.tracker.add( |
| - this.headerFooterCheckbox_, |
| + assert(this.headerFooterCheckbox_), |
| 'click', |
| this.onHeaderFooterCheckboxClick_.bind(this)); |
| this.tracker.add( |
| - this.fitToPageCheckbox_, |
| + assert(this.fitToPageCheckbox_), |
| 'click', |
| this.onFitToPageCheckboxClick_.bind(this)); |
| this.tracker.add( |
| - this.duplexCheckbox_, |
| + assert(this.duplexCheckbox_), |
| 'click', |
| this.onDuplexCheckboxClick_.bind(this)); |
| this.tracker.add( |
| - this.cssBackgroundCheckbox_, |
| + assert(this.cssBackgroundCheckbox_), |
| 'click', |
| this.onCssBackgroundCheckboxClick_.bind(this)); |
| this.tracker.add( |
| - this.selectionOnlyCheckbox_, |
| + assert(this.selectionOnlyCheckbox_), |
| 'click', |
| this.onSelectionOnlyCheckboxClick_.bind(this)); |
| this.tracker.add( |
| - this.duplexTicketItem_, |
| + assert(this.duplexTicketItem_), |
| print_preview.ticket_items.TicketItem.EventType.CHANGE, |
| this.onDuplexChange_.bind(this)); |
| this.tracker.add( |
| - this.fitToPageTicketItem_, |
| + assert(this.fitToPageTicketItem_), |
| print_preview.ticket_items.TicketItem.EventType.CHANGE, |
| this.onFitToPageChange_.bind(this)); |
| this.tracker.add( |
| - this.cssBackgroundTicketItem_, |
| + assert(this.cssBackgroundTicketItem_), |
| print_preview.ticket_items.TicketItem.EventType.CHANGE, |
| this.onCssBackgroundChange_.bind(this)); |
| this.tracker.add( |
| - this.selectionOnlyTicketItem_, |
| + assert(this.selectionOnlyTicketItem_), |
| print_preview.ticket_items.TicketItem.EventType.CHANGE, |
| this.onSelectionOnlyChange_.bind(this)); |
| this.tracker.add( |
| - this.headerFooterTicketItem_, |
| + assert(this.headerFooterTicketItem_), |
| print_preview.ticket_items.TicketItem.EventType.CHANGE, |
| this.onHeaderFooterChange_.bind(this)); |
| }, |
| @@ -244,18 +244,18 @@ cr.define('print_preview', function() { |
| /** @override */ |
| updateUiStateInternal: function() { |
| if (this.isAvailable()) { |
| - setIsVisible(this.headerFooterContainer_, |
| + setIsVisible(assert(this.headerFooterContainer_), |
| this.headerFooterTicketItem_.isCapabilityAvailable() && |
| !this.collapseContent); |
| - setIsVisible(this.fitToPageContainer_, |
| + setIsVisible(assert(this.fitToPageContainer_), |
| this.fitToPageTicketItem_.isCapabilityAvailable() && |
| !this.collapseContent); |
| - setIsVisible(this.duplexContainer_, |
| + setIsVisible(assert(this.duplexContainer_), |
| this.duplexTicketItem_.isCapabilityAvailable()); |
| - setIsVisible(this.cssBackgroundContainer_, |
| + setIsVisible(assert(this.cssBackgroundContainer_), |
| this.cssBackgroundTicketItem_.isCapabilityAvailable() && |
| !this.collapseContent); |
| - setIsVisible(this.selectionOnlyContainer_, |
| + setIsVisible(assert(this.selectionOnlyContainer_), |
| this.selectionOnlyTicketItem_.isCapabilityAvailable() && |
| !this.collapseContent); |
| } |
| @@ -321,7 +321,8 @@ cr.define('print_preview', function() { |
| * @private |
| */ |
| onDuplexChange_: function() { |
| - this.duplexCheckbox_.checked = this.duplexTicketItem_.getValue(); |
| + this.duplexCheckbox_.checked = /** @type {boolean} */ |
| + (this.duplexTicketItem_.getValue()); |
|
Dan Beam
2014/09/24 23:31:21
nit: !!
Vitaly Pavlenko
2014/09/24 23:57:07
Done.
|
| this.updateUiStateInternal(); |
| }, |
| @@ -331,7 +332,8 @@ cr.define('print_preview', function() { |
| * @private |
| */ |
| onFitToPageChange_: function() { |
| - this.fitToPageCheckbox_.checked = this.fitToPageTicketItem_.getValue(); |
| + this.fitToPageCheckbox_.checked = /** @type {boolean} */ |
| + (this.fitToPageTicketItem_.getValue()); |
| this.updateUiStateInternal(); |
| }, |
| @@ -341,8 +343,8 @@ cr.define('print_preview', function() { |
| * @private |
| */ |
| onCssBackgroundChange_: function() { |
| - this.cssBackgroundCheckbox_.checked = |
| - this.cssBackgroundTicketItem_.getValue(); |
| + this.cssBackgroundCheckbox_.checked = /** @type {boolean} */ |
| + (this.cssBackgroundTicketItem_.getValue()); |
| this.updateUiStateInternal(); |
| }, |
| @@ -352,8 +354,8 @@ cr.define('print_preview', function() { |
| * @private |
| */ |
| onSelectionOnlyChange_: function() { |
| - this.selectionOnlyCheckbox_.checked = |
| - this.selectionOnlyTicketItem_.getValue(); |
| + this.selectionOnlyCheckbox_.checked = /** @type {boolean} */ |
| + (this.selectionOnlyTicketItem_.getValue()); |
| this.updateUiStateInternal(); |
| }, |
| @@ -363,8 +365,8 @@ cr.define('print_preview', function() { |
| * @private |
| */ |
| onHeaderFooterChange_: function() { |
| - this.headerFooterCheckbox_.checked = |
| - this.headerFooterTicketItem_.getValue(); |
| + this.headerFooterCheckbox_.checked = /** @type {boolean} */ |
| + (this.headerFooterTicketItem_.getValue()); |
| this.updateUiStateInternal(); |
| } |
| }; |