Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 cr.define('print_preview.ticket_items', function() { | |
| 6 'use strict'; | |
| 7 | |
| 8 /** | |
| 9 * Rasterize ticket item whose value is a {@code boolean} that indicates | |
| 10 * whether the PDF document should be rendered as images. | |
| 11 * @constructor | |
| 12 * @param {!print_preview.DestinationStore} destinationStore Destination store | |
| 13 * used determine if a destination should have the rasterize capability. | |
| 14 * @param {!print_preview.DocumentInfo} documentInfo Information about the | |
| 15 * document to print, used to determine if document is a PDF. | |
| 16 * @extends {print_preview.ticket_items.TicketItem} | |
| 17 */ | |
| 18 function Rasterize(destinationStore, documentInfo) { | |
| 19 print_preview.ticket_items.TicketItem.call( | |
| 20 this, null /*appState*/, null /*field*/, destinationStore, | |
|
dpapad
2016/12/13 23:38:18
Nit: Add spaces
/* appState */
rbpotter
2016/12/15 00:50:58
Done.
| |
| 21 documentInfo); | |
| 22 }; | |
| 23 | |
| 24 Rasterize.prototype = { | |
| 25 __proto__: print_preview.ticket_items.TicketItem.prototype, | |
| 26 | |
| 27 /** @override */ | |
| 28 wouldValueBeValid: function(value) { | |
| 29 return true; | |
| 30 }, | |
| 31 | |
| 32 /** @override */ | |
| 33 isCapabilityAvailable: function() { | |
| 34 return !this.getDocumentInfoInternal().isModifiable; | |
| 35 }, | |
| 36 | |
| 37 /** @override */ | |
| 38 getDefaultValueInternal: function() { | |
| 39 return false; | |
| 40 }, | |
| 41 | |
| 42 /** @override */ | |
| 43 getCapabilityNotAvailableValueInternal: function() { | |
| 44 return this.getDefaultValueInternal(); | |
| 45 } | |
| 46 }; | |
| 47 | |
| 48 // Export | |
| 49 return { | |
| 50 Rasterize: Rasterize | |
| 51 }; | |
| 52 }); | |
| OLD | NEW |