OLD | NEW |
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 * Fit-to-page ticket item whose value is a {@code boolean} that indicates | 9 * Fit-to-page ticket item whose value is a {@code boolean} that indicates |
10 * whether to scale the document to fit the page. | 10 * whether to scale the document to fit the page. |
11 * @param {!print_preview.AppState} appState App state to persist item value. | 11 * @param {!print_preview.AppState} appState App state to persist item value. |
12 * @param {!print_preview.DocumentInfo} documentInfo Information about the | 12 * @param {!print_preview.DocumentInfo} documentInfo Information about the |
13 * document to print. | 13 * document to print. |
14 * @param {!print_preview.DestinationStore} destinationStore Used to determine | 14 * @param {!print_preview.DestinationStore} destinationStore Used to determine |
15 * whether fit to page should be available. | 15 * whether fit to page should be available. |
16 * @constructor | 16 * @constructor |
17 * @extends {print_preview.ticket_items.TicketItem} | 17 * @extends {print_preview.ticket_items.TicketItem} |
18 */ | 18 */ |
19 function FitToPage(appState, documentInfo, destinationStore) { | 19 function FitToPage(appState, documentInfo, destinationStore) { |
20 print_preview.ticket_items.TicketItem.call( | 20 print_preview.ticket_items.TicketItem.call( |
21 this, | 21 this, |
22 appState, | 22 appState, |
23 print_preview.AppState.Field.IS_FIT_TO_PAGE_ENABLED, | 23 print_preview.AppStateField.IS_FIT_TO_PAGE_ENABLED, |
24 destinationStore, | 24 destinationStore, |
25 documentInfo); | 25 documentInfo); |
26 }; | 26 } |
27 | 27 |
28 FitToPage.prototype = { | 28 FitToPage.prototype = { |
29 __proto__: print_preview.ticket_items.TicketItem.prototype, | 29 __proto__: print_preview.ticket_items.TicketItem.prototype, |
30 | 30 |
31 /** @override */ | 31 /** @override */ |
32 wouldValueBeValid: function(value) { | 32 wouldValueBeValid: function(value) { |
33 return true; | 33 return true; |
34 }, | 34 }, |
35 | 35 |
36 /** @override */ | 36 /** @override */ |
(...skipping 18 matching lines...) Expand all Loading... |
55 this.getSelectedDestInternal().id != | 55 this.getSelectedDestInternal().id != |
56 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF; | 56 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF; |
57 } | 57 } |
58 }; | 58 }; |
59 | 59 |
60 // Export | 60 // Export |
61 return { | 61 return { |
62 FitToPage: FitToPage | 62 FitToPage: FitToPage |
63 }; | 63 }; |
64 }); | 64 }); |
OLD | NEW |