| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 cr.define('print_preview', function() { | 5 cr.define('print_preview', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Base class for print option section components. | 9 * Base class for print option section components. |
| 10 * @constructor | 10 * @constructor |
| 11 * @extends {print_preview.Component} | 11 * @extends {print_preview.Component} |
| 12 */ | 12 */ |
| 13 function SettingsSection() { | 13 function SettingsSection() { |
| 14 print_preview.Component.call(this); | 14 print_preview.Component.call(this); |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Cached "hasCollapsibleContent" status for COLLAPSIBLE_CONTENT_CHANGED | 17 * Cached "hasCollapsibleContent" status for COLLAPSIBLE_CONTENT_CHANGED |
| 18 * notification. | 18 * notification. |
| 19 * @private {?boolean} | 19 * @private {?boolean} |
| 20 */ | 20 */ |
| 21 this.hasCollapsibleContentCached_ = null; | 21 this.hasCollapsibleContentCached_ = null; |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * Whether content of this section should be collapsed or not. | 24 * Whether content of this section should be collapsed or not. |
| 25 * @private {boolean} | 25 * @private {boolean} |
| 26 */ | 26 */ |
| 27 this.collapseContent_ = true; | 27 this.collapseContent_ = true; |
| 28 }; | 28 } |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * Event types dispatched by this class. | 31 * Event types dispatched by this class. |
| 32 * @enum {string} | 32 * @enum {string} |
| 33 */ | 33 */ |
| 34 SettingsSection.EventType = { | 34 SettingsSection.EventType = { |
| 35 COLLAPSIBLE_CONTENT_CHANGED: | 35 COLLAPSIBLE_CONTENT_CHANGED: |
| 36 'print_preview.SettingsSection.COLLAPSIBLE_CONTENT_CHANGED' | 36 'print_preview.SettingsSection.COLLAPSIBLE_CONTENT_CHANGED' |
| 37 }; | 37 }; |
| 38 | 38 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 isSectionVisibleInternal: function() { | 113 isSectionVisibleInternal: function() { |
| 114 return this.isAvailable() && !this.collapseContent_; | 114 return this.isAvailable() && !this.collapseContent_; |
| 115 } | 115 } |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 // Export | 118 // Export |
| 119 return { | 119 return { |
| 120 SettingsSection: SettingsSection | 120 SettingsSection: SettingsSection |
| 121 }; | 121 }; |
| 122 }); | 122 }); |
| OLD | NEW |