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

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

Issue 2524143003: Print Preview: Add option to rasterize PDFs and add JPEG compression. (Closed)
Patch Set: Clean up JS Created 3 years, 12 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
(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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698