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 c6b3ad477d822fc5d5f5acd6173d3f598a9d1624..c5e1563e29a8b76d05d9eea66f8ca0d5ea0fd5c7 100644 |
--- a/chrome/browser/resources/print_preview/settings/other_options_settings.js |
+++ b/chrome/browser/resources/print_preview/settings/other_options_settings.js |
@@ -16,14 +16,11 @@ cr.define('print_preview', function() { |
* only ticket item. |
* @param {!print_preview.ticket_items.HeaderFooter} headerFooter Header |
* footer ticket item. |
- * @param {!print_preview.ticket_items.DistillPage} distillPage Print |
- * distill page ticket item. |
* @constructor |
* @extends {print_preview.SettingsSection} |
*/ |
function OtherOptionsSettings( |
- duplex, fitToPage, cssBackground, selectionOnly, |
- headerFooter, distillPage) { |
+ duplex, fitToPage, cssBackground, selectionOnly, headerFooter) { |
print_preview.SettingsSection.call(this); |
/** |
@@ -61,27 +58,6 @@ cr.define('print_preview', function() { |
*/ |
this.headerFooterTicketItem_ = headerFooter; |
- /** |
- * Distill page ticket item, used to read/write. |
- * @type {!print_preview.ticket_items.DistillPage} |
- * @private |
- */ |
- this.distillPageTicketItem_ = distillPage; |
- |
- /** |
- * Distill page container element. |
- * @type {HTMLElement} |
- * @private |
- */ |
- this.distillPageContainer_ = null; |
- |
- /** |
- * Distill page checkbox. |
- * @type {HTMLInputElement} |
- * @private |
- */ |
- this.distillPageCheckbox_ = null; |
- |
/** |
* Header footer container element. |
* @type {HTMLElement} |
@@ -158,8 +134,7 @@ cr.define('print_preview', function() { |
/** @override */ |
isAvailable: function() { |
- return this.distillPageTicketItem_.isCapabilityAvailable() || |
- this.headerFooterTicketItem_.isCapabilityAvailable() || |
+ return this.headerFooterTicketItem_.isCapabilityAvailable() || |
this.fitToPageTicketItem_.isCapabilityAvailable() || |
this.duplexTicketItem_.isCapabilityAvailable() || |
this.cssBackgroundTicketItem_.isCapabilityAvailable() || |
@@ -178,7 +153,6 @@ cr.define('print_preview', function() { |
this.headerFooterCheckbox_.disabled = !isEnabled; |
this.fitToPageCheckbox_.disabled = !isEnabled; |
this.duplexCheckbox_.disabled = !isEnabled; |
- this.distillPageCheckbox_.disabled = !isEnabled; |
this.cssBackgroundCheckbox_.disabled = !isEnabled; |
}, |
@@ -186,10 +160,6 @@ cr.define('print_preview', function() { |
enterDocument: function() { |
print_preview.SettingsSection.prototype.enterDocument.call(this); |
this.tracker.add( |
- this.distillPageCheckbox_, |
- 'click', |
- this.onDistillPageCheckboxClick_.bind(this)); |
- this.tracker.add( |
this.headerFooterCheckbox_, |
'click', |
this.onHeaderFooterCheckboxClick_.bind(this)); |
@@ -229,17 +199,11 @@ cr.define('print_preview', function() { |
this.headerFooterTicketItem_, |
print_preview.ticket_items.TicketItem.EventType.CHANGE, |
this.onHeaderFooterChange_.bind(this)); |
- this.tracker.add( |
- this.distillPageTicketItem_, |
- print_preview.ticket_items.TicketItem.EventType.CHANGE, |
- this.onDistillPageChange_.bind(this)); |
}, |
/** @override */ |
exitDocument: function() { |
print_preview.SettingsSection.prototype.exitDocument.call(this); |
- this.distillPageContainer_ = null; |
- this.distillPageCheckbox_ = null; |
this.headerFooterContainer_ = null; |
this.headerFooterCheckbox_ = null; |
this.fitToPageContainer_ = null; |
@@ -254,10 +218,6 @@ cr.define('print_preview', function() { |
/** @override */ |
decorateInternal: function() { |
- this.distillPageContainer_ = this.getElement().querySelector( |
- '.distill-page-container'); |
- this.distillPageCheckbox_ = this.distillPageContainer_.querySelector( |
- '.distill-page-checkbox'); |
this.headerFooterContainer_ = this.getElement().querySelector( |
'.header-footer-container'); |
this.headerFooterCheckbox_ = this.headerFooterContainer_.querySelector( |
@@ -283,8 +243,6 @@ cr.define('print_preview', function() { |
/** @override */ |
updateUiStateInternal: function() { |
if (this.isAvailable()) { |
- setIsVisible(this.distillPageContainer_, |
- this.distillPageTicketItem_.isCapabilityAvailable()); |
setIsVisible(this.headerFooterContainer_, |
this.headerFooterTicketItem_.isCapabilityAvailable() && |
!this.collapseContent); |
@@ -305,24 +263,13 @@ cr.define('print_preview', function() { |
/** @override */ |
isSectionVisibleInternal: function() { |
if (this.collapseContent) { |
- return this.distillPageTicketItem_.isCapabilityAvailable() || |
- this.fitToPageTicketItem_.isCapabilityAvailable() || |
+ return this.fitToPageTicketItem_.isCapabilityAvailable() || |
this.duplexTicketItem_.isCapabilityAvailable(); |
} |
return this.isAvailable(); |
}, |
- /** |
- * Called when the distill-page checkbox is clicked. Updates the print |
- * ticket. |
- * @private |
- */ |
- onDistillPageCheckboxClick_: function() { |
- this.distillPageTicketItem_.updateValue( |
- this.distillPageCheckbox_.checked); |
- }, |
- |
/** |
* Called when the header-footer checkbox is clicked. Updates the print |
* ticket. |
@@ -422,17 +369,6 @@ cr.define('print_preview', function() { |
this.headerFooterTicketItem_.getValue(); |
this.updateUiStateInternal(); |
}, |
- |
- /** |
- * Called when the distill-page ticket item has changed. Updates the |
- * distill-page checkbox. |
- * @private |
- */ |
- onDistillPageChange_: function() { |
- this.distillPageCheckbox_.checked = |
- this.distillPageTicketItem_.getValue(); |
- this.updateUiStateInternal(); |
- } |
}; |
// Export |