| Index: chrome/browser/resources/print_preview/data/ticket_items/rasterize.js
|
| diff --git a/chrome/browser/resources/print_preview/data/ticket_items/rasterize.js b/chrome/browser/resources/print_preview/data/ticket_items/rasterize.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b8ea06d2ed481ad6a8137c4d4eb1435570803bfb
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/print_preview/data/ticket_items/rasterize.js
|
| @@ -0,0 +1,50 @@
|
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +cr.define('print_preview.ticket_items', function() {
|
| + 'use strict';
|
| +
|
| + /**
|
| + * Rasterize ticket item whose value is a {@code boolean} that indicates
|
| + * whether the PDF document should be rendered as images.
|
| + * @constructor
|
| + * @param {!print_preview.DocumentInfo} documentInfo Information about the
|
| + * document to print, used to determine if document is a PDF.
|
| + * @extends {print_preview.ticket_items.TicketItem}
|
| + */
|
| + function Rasterize(destinationStore, documentInfo) {
|
| + print_preview.ticket_items.TicketItem.call(
|
| + this, null /* appState */, null /* field */,
|
| + null /* destinationStore */, documentInfo);
|
| + };
|
| +
|
| + Rasterize.prototype = {
|
| + __proto__: print_preview.ticket_items.TicketItem.prototype,
|
| +
|
| + /** @override */
|
| + wouldValueBeValid: function(value) {
|
| + return true;
|
| + },
|
| +
|
| + /** @override */
|
| + isCapabilityAvailable: function() {
|
| + return !this.getDocumentInfoInternal().isModifiable;
|
| + },
|
| +
|
| + /** @override */
|
| + getDefaultValueInternal: function() {
|
| + return false;
|
| + },
|
| +
|
| + /** @override */
|
| + getCapabilityNotAvailableValueInternal: function() {
|
| + return this.getDefaultValueInternal();
|
| + }
|
| + };
|
| +
|
| + // Export
|
| + return {
|
| + Rasterize: Rasterize
|
| + };
|
| +});
|
|
|