Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: chrome/browser/resources/print_preview/page_settings.js

Issue 7358002: Print Preview: Refactoring layout mode related logic to LayoutSettings class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing nits Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/layout_settings.js ('k') | chrome/browser/resources/print_preview/print_preview.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698