Allow chrome.systemPrivate to be used by apps.
[chromium-blink-merge.git] / printing / print_job_constants.cc
blob8ac5db4f7213f7f55ff8d4ddddca9ed9118134e1
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
3 // found in the LICENSE file.
5 #include "printing/print_job_constants.h"
7 namespace printing {
9 // True if this is the first preview request.
10 const char kIsFirstRequest[] = "isFirstRequest";
12 // Unique ID sent along every preview request.
13 const char kPreviewRequestID[] = "requestID";
15 // Unique ID to identify a print preview UI.
16 const char kPreviewUIID[] = "previewUIID";
18 // Capabilities option. Contains the capabilities in CDD format.
19 const char kSettingCapabilities[] = "capabilities";
21 // Print using cloud print: true if selected, false if not.
22 const char kSettingCloudPrintId[] = "cloudPrintID";
24 // Print using cloud print dialog: true if selected, false if not.
25 const char kSettingCloudPrintDialog[] = "printWithCloudPrint";
27 // Print job setting 'collate'.
28 const char kSettingCollate[] = "collate";
30 // Print out color: true for color, false for grayscale.
31 const char kSettingColor[] = "color";
33 // Default to color on or not.
34 const char kSettingSetColorAsDefault[] = "setColorAsDefault";
36 // Key that specifies the height of the content area of the page.
37 const char kSettingContentHeight[] = "contentHeight";
39 // Key that specifies the width of the content area of the page.
40 const char kSettingContentWidth[] = "contentWidth";
42 // Number of copies.
43 const char kSettingCopies[] = "copies";
45 // Device name: Unique printer identifier.
46 const char kSettingDeviceName[] = "deviceName";
48 // Print job duplex mode.
49 const char kSettingDuplexMode[] = "duplex";
51 // Option to fit source page contents to printer paper size: true if
52 // selected else false.
53 const char kSettingFitToPageEnabled[] = "fitToPageEnabled";
55 // True, when a new set of draft preview data is required.
56 const char kSettingGenerateDraftData[] = "generateDraftData";
58 // Option to print headers and Footers: true if selected, false if not.
59 const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
61 // Interstice or gap between different header footer components. Hardcoded to
62 // about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea.
63 const float kSettingHeaderFooterInterstice = 14.2f;
65 // Key that specifies the date of the page that will be printed in the headers
66 // and footers.
67 const char kSettingHeaderFooterDate[] = "date";
69 // Key that specifies the title of the page that will be printed in the headers
70 // and footers.
71 const char kSettingHeaderFooterTitle[] = "title";
73 // Key that specifies the URL of the page that will be printed in the headers
74 // and footers.
75 const char kSettingHeaderFooterURL[] = "url";
77 // Page orientation: true for landscape, false for portrait.
78 const char kSettingLandscape[] = "landscape";
80 // Key that specifies the requested media size.
81 const char kSettingMediaSize[] = "mediaSize";
83 // Key that specifies the requested media height in microns.
84 const char kSettingMediaSizeHeightMicrons[] = "height_microns";
86 // Key that specifies the requested media width in microns.
87 const char kSettingMediaSizeWidthMicrons[] = "width_microns";
89 // Key that specifies the requested media platform specific vendor id.
90 const char kSettingMediaSizeVendorId[] = "vendor_id";
92 // Key that specifies the bottom margin of the page.
93 const char kSettingMarginBottom[] = "marginBottom";
95 // Key that specifies the left margin of the page.
96 const char kSettingMarginLeft[] = "marginLeft";
98 // Key that specifies the right margin of the page.
99 const char kSettingMarginRight[] = "marginRight";
101 // Key that specifies the top margin of the page.
102 const char kSettingMarginTop[] = "marginTop";
104 // Key that specifies the dictionary of custom margins as set by the user.
105 const char kSettingMarginsCustom[] = "marginsCustom";
107 // Key that specifies the type of margins to use. Value is an int from the
108 // MarginType enum.
109 const char kSettingMarginsType[] = "marginsType";
111 // Number of pages to print.
112 const char kSettingPreviewPageCount[] = "pageCount";
114 // A page range.
115 const char kSettingPageRange[] = "pageRange";
117 // The first page of a page range. (1-based)
118 const char kSettingPageRangeFrom[] = "from";
120 // The last page of a page range. (1-based)
121 const char kSettingPageRangeTo[] = "to";
123 // Page size of document to print.
124 const char kSettingPageWidth[] = "pageWidth";
125 const char kSettingPageHeight[] = "pageHeight";
127 const char kSettingPreviewModifiable[] = "previewModifiable";
129 // Keys that specifies the printable area details.
130 const char kSettingPrintableAreaX[] = "printableAreaX";
131 const char kSettingPrintableAreaY[] = "printableAreaY";
132 const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
133 const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
135 // Printer name.
136 const char kSettingPrinterName[] = "printerName";
138 // Printer description.
139 const char kSettingPrinterDescription[] = "printerDescription";
141 // Additional printer options.
142 const char kSettingPrinterOptions[] = "printerOptions";
144 // Print to PDF option: true if selected, false if not.
145 const char kSettingPrintToPDF[] = "printToPDF";
147 // Print using Privet option: true if destination is a Privet printer, false if
148 // not.
149 const char kSettingPrintWithPrivet[] = "printWithPrivet";
151 // Ticket option. Contains the ticket in CJT format.
152 const char kSettingTicket[] = "ticket";
154 // Whether to print CSS backgrounds.
155 const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds";
157 // Whether to print selection only.
158 const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly";
160 // Indices used to represent first preview page and complete preview document.
161 const int FIRST_PAGE_INDEX = 0;
162 const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
164 // Whether to show PDF in view provided by OS. Implemented for MacOS only.
165 const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview";
167 #if defined (USE_CUPS)
168 const char kBlack[] = "Black";
169 const char kCMYK[] = "CMYK";
170 const char kKCMY[] = "KCMY";
171 const char kCMY_K[] = "CMY+K";
172 const char kCMY[] = "CMY";
173 const char kColor[] = "Color";
174 const char kGray[] = "Gray";
175 const char kGrayscale[] = "Grayscale";
176 const char kGreyscale[] = "Greyscale";
177 const char kMonochrome[] = "Monochrome";
178 const char kNormal[] = "Normal";
179 const char kNormalGray[] = "Normal.Gray";
180 const char kRGB[] = "RGB";
181 const char kRGBA[] = "RGBA";
182 const char kRGB16[] = "RGB16";
183 #endif
185 } // namespace printing