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.DocumentInfo} documentInfo Information about the |
| 13 * document to print, used to determine if document is a PDF. |
| 14 * @extends {print_preview.ticket_items.TicketItem} |
| 15 */ |
| 16 function Rasterize(destinationStore, documentInfo) { |
| 17 print_preview.ticket_items.TicketItem.call( |
| 18 this, null /* appState */, null /* field */, |
| 19 null /* destinationStore */, documentInfo); |
| 20 }; |
| 21 |
| 22 Rasterize.prototype = { |
| 23 __proto__: print_preview.ticket_items.TicketItem.prototype, |
| 24 |
| 25 /** @override */ |
| 26 wouldValueBeValid: function(value) { |
| 27 return true; |
| 28 }, |
| 29 |
| 30 /** @override */ |
| 31 isCapabilityAvailable: function() { |
| 32 return !this.getDocumentInfoInternal().isModifiable; |
| 33 }, |
| 34 |
| 35 /** @override */ |
| 36 getDefaultValueInternal: function() { |
| 37 return false; |
| 38 }, |
| 39 |
| 40 /** @override */ |
| 41 getCapabilityNotAvailableValueInternal: function() { |
| 42 return this.getDefaultValueInternal(); |
| 43 } |
| 44 }; |
| 45 |
| 46 // Export |
| 47 return { |
| 48 Rasterize: Rasterize |
| 49 }; |
| 50 }); |
OLD | NEW |