| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 * Creates a PageSettings object. This object encapsulates all settings and | 9 * Creates a PageSettings object. This object encapsulates all settings and |
| 10 * logic related to page selection. | 10 * logic related to page selection. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 invalidatePreviouslySelectedPages_: function() { | 133 invalidatePreviouslySelectedPages_: function() { |
| 134 this.previouslySelectedPages_.length = 0; | 134 this.previouslySelectedPages_.length = 0; |
| 135 }, | 135 }, |
| 136 | 136 |
| 137 /** | 137 /** |
| 138 * Resets all the state variables of this object and hides | 138 * Resets all the state variables of this object and hides |
| 139 * |this.selectedPagesHint|. | 139 * |this.selectedPagesHint|. |
| 140 */ | 140 */ |
| 141 resetState: function() { | 141 resetState: function() { |
| 142 this.selectedPagesTextfield.classList.remove('invalid'); | 142 this.selectedPagesTextfield.classList.remove('invalid'); |
| 143 fadeOutElement(this.selectedPagesHint); | 143 fadeOutElement(this.selectedPagesHint_); |
| 144 this.invalidateTotalPageCount_(); | 144 this.invalidateTotalPageCount_(); |
| 145 this.invalidatePreviouslySelectedPages_(); | 145 this.invalidatePreviouslySelectedPages_(); |
| 146 }, | 146 }, |
| 147 | 147 |
| 148 /** | 148 /** |
| 149 * Updates |this.totalPageCount_| and |this.previouslySelectedPages_|, | 149 * Updates |this.totalPageCount_| and |this.previouslySelectedPages_|, |
| 150 * only if they have been previously invalidated. | 150 * only if they have been previously invalidated. |
| 151 * @param {number} newTotalPageCount The new total page count. | 151 * @param {number} newTotalPageCount The new total page count. |
| 152 */ | 152 */ |
| 153 updateState: function(newTotalPageCount) { | 153 updateState: function(newTotalPageCount) { |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 this.onSelectedPagesMayHaveChanged_(); | 359 this.onSelectedPagesMayHaveChanged_(); |
| 360 } | 360 } |
| 361 }.bind(this); | 361 }.bind(this); |
| 362 } | 362 } |
| 363 }; | 363 }; |
| 364 | 364 |
| 365 return { | 365 return { |
| 366 PageSettings: PageSettings, | 366 PageSettings: PageSettings, |
| 367 }; | 367 }; |
| 368 }); | 368 }); |
| OLD | NEW |