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

Side by Side Diff: chrome/browser/resources/print_preview/data/ticket_items/ticket_item.js

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.ticket_items', function() { 5 cr.define('print_preview.ticket_items', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * An object that represents a user modifiable item in a print ticket. Each 9 * An object that represents a user modifiable item in a print ticket. Each
10 * ticket item has a value which can be set by the user. Ticket items can also 10 * ticket item has a value which can be set by the user. Ticket items can also
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 return this.tracker_; 177 return this.tracker_;
178 }, 178 },
179 179
180 /** 180 /**
181 * @return {print_preview.Destination} Selected destination from the 181 * @return {print_preview.Destination} Selected destination from the
182 * destination store, or {@code null} if no destination is selected. 182 * destination store, or {@code null} if no destination is selected.
183 * @protected 183 * @protected
184 */ 184 */
185 getSelectedDestInternal: function() { 185 getSelectedDestInternal: function() {
186 return this.destinationStore_ ? 186 return this.destinationStore_ ?
187 this.destinationStore_.selectedDestination : null; 187 this.destinationStore_.selectedDestination :
188 null;
188 }, 189 },
189 190
190 /** 191 /**
191 * @return {print_preview.DocumentInfo} Document data model. 192 * @return {print_preview.DocumentInfo} Document data model.
192 * @protected 193 * @protected
193 */ 194 */
194 getDocumentInfoInternal: function() { 195 getDocumentInfoInternal: function() {
195 return this.documentInfo_; 196 return this.documentInfo_;
196 }, 197 },
197 198
(...skipping 16 matching lines...) Expand all
214 }, 215 },
215 216
216 /** 217 /**
217 * Adds event handlers for this class. 218 * Adds event handlers for this class.
218 * @private 219 * @private
219 */ 220 */
220 addEventHandlers_: function() { 221 addEventHandlers_: function() {
221 if (this.destinationStore_) { 222 if (this.destinationStore_) {
222 this.tracker_.add( 223 this.tracker_.add(
223 this.destinationStore_, 224 this.destinationStore_,
224 print_preview.DestinationStore.EventType. 225 print_preview.DestinationStore.EventType
225 SELECTED_DESTINATION_CAPABILITIES_READY, 226 .SELECTED_DESTINATION_CAPABILITIES_READY,
226 this.dispatchChangeEventInternal.bind(this)); 227 this.dispatchChangeEventInternal.bind(this));
227 } 228 }
228 if (this.documentInfo_) { 229 if (this.documentInfo_) {
229 this.tracker_.add( 230 this.tracker_.add(
230 this.documentInfo_, 231 this.documentInfo_, print_preview.DocumentInfo.EventType.CHANGE,
231 print_preview.DocumentInfo.EventType.CHANGE,
232 this.dispatchChangeEventInternal.bind(this)); 232 this.dispatchChangeEventInternal.bind(this));
233 } 233 }
234 }, 234 },
235 }; 235 };
236 236
237 // Export 237 // Export
238 return { 238 return {TicketItem: TicketItem};
239 TicketItem: TicketItem
240 };
241 }); 239 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698