Upload upstream chromium 73.0.3683.0
[platform/framework/web/chromium-efl.git] / printing / print_job_constants.cc
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.
4
5 #include "printing/print_job_constants.h"
6
7 #include "printing/buildflags/buildflags.h"
8
9 namespace printing {
10
11 // True if this is the first preview request.
12 const char kIsFirstRequest[] = "isFirstRequest";
13
14 // Unique ID sent along every preview request.
15 const char kPreviewRequestID[] = "requestID";
16
17 // Unique ID to identify a print preview UI.
18 const char kPreviewUIID[] = "previewUIID";
19
20 // Capabilities option. Contains the capabilities in CDD format.
21 const char kSettingCapabilities[] = "capabilities";
22
23 // Print using cloud print: true if selected, false if not.
24 const char kSettingCloudPrintId[] = "cloudPrintID";
25
26 // Print using cloud print dialog: true if selected, false if not.
27 const char kSettingCloudPrintDialog[] = "printWithCloudPrint";
28
29 // Print job setting 'collate'.
30 const char kSettingCollate[] = "collate";
31
32 // Print out color: true for color, false for grayscale.
33 const char kSettingColor[] = "color";
34
35 // Default to color on or not.
36 const char kSettingSetColorAsDefault[] = "setColorAsDefault";
37
38 // Key that specifies the height of the content area of the page.
39 const char kSettingContentHeight[] = "contentHeight";
40
41 // Key that specifies the width of the content area of the page.
42 const char kSettingContentWidth[] = "contentWidth";
43
44 // Number of copies.
45 const char kSettingCopies[] = "copies";
46
47 // Device name: Unique printer identifier.
48 const char kSettingDeviceName[] = "deviceName";
49
50 // Option to disable scaling. True if scaling is disabled else false.
51 const char kSettingDisableScaling[] = "disableScaling";
52
53 // Default DPI
54 const char kSettingDpiDefault[] = "dpiDefault";
55
56 // Horizontal DPI
57 const char kSettingDpiHorizontal[] = "dpiHorizontal";
58
59 // Vertical DPI
60 const char kSettingDpiVertical[] = "dpiVertical";
61
62 // Scaling value required to fit the document to page.
63 const char kSettingFitToPageScaling[] = "fitToPageScaling";
64
65 // Print job duplex mode.
66 const char kSettingDuplexMode[] = "duplex";
67
68 // Option to fit source page contents to printer paper size: true if
69 // selected else false.
70 const char kSettingFitToPageEnabled[] = "fitToPageEnabled";
71
72 // Option to print headers and Footers: true if selected, false if not.
73 const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
74
75 // Interstice or gap between different header footer components. Hardcoded to
76 // about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea.
77 const float kSettingHeaderFooterInterstice = 14.2f;
78
79 // Key that specifies the date of the page that will be printed in the headers
80 // and footers.
81 const char kSettingHeaderFooterDate[] = "date";
82
83 // Key that specifies the title of the page that will be printed in the headers
84 // and footers.
85 const char kSettingHeaderFooterTitle[] = "title";
86
87 // Key that specifies the URL of the page that will be printed in the headers
88 // and footers.
89 const char kSettingHeaderFooterURL[] = "url";
90
91 // Page orientation: true for landscape, false for portrait.
92 const char kSettingLandscape[] = "landscape";
93
94 // Key that specifies the requested media size.
95 const char kSettingMediaSize[] = "mediaSize";
96
97 // Key that specifies the requested media height in microns.
98 const char kSettingMediaSizeHeightMicrons[] = "height_microns";
99
100 // Key that specifies the requested media width in microns.
101 const char kSettingMediaSizeWidthMicrons[] = "width_microns";
102
103 // Key that specifies the requested media platform specific vendor id.
104 const char kSettingMediaSizeVendorId[] = "vendor_id";
105
106 // Key that specifies whether the requested media is a default one.
107 const char kSettingMediaSizeIsDefault[] = "is_default";
108
109 // Key that specifies the bottom margin of the page.
110 const char kSettingMarginBottom[] = "marginBottom";
111
112 // Key that specifies the left margin of the page.
113 const char kSettingMarginLeft[] = "marginLeft";
114
115 // Key that specifies the right margin of the page.
116 const char kSettingMarginRight[] = "marginRight";
117
118 // Key that specifies the top margin of the page.
119 const char kSettingMarginTop[] = "marginTop";
120
121 // Key that specifies the dictionary of custom margins as set by the user.
122 const char kSettingMarginsCustom[] = "marginsCustom";
123
124 // Key that specifies the type of margins to use.  Value is an int from the
125 // MarginType enum.
126 const char kSettingMarginsType[] = "marginsType";
127
128 // Number of pages to print.
129 const char kSettingPreviewPageCount[] = "pageCount";
130
131 // A page range.
132 const char kSettingPageRange[] = "pageRange";
133
134 // The first page of a page range. (1-based)
135 const char kSettingPageRangeFrom[] = "from";
136
137 // The last page of a page range. (1-based)
138 const char kSettingPageRangeTo[] = "to";
139
140 // Page size of document to print.
141 const char kSettingPageWidth[] = "pageWidth";
142 const char kSettingPageHeight[] = "pageHeight";
143
144 // Policies affecting printing destination.
145 const char kSettingPolicies[] = "policies";
146
147 const char kSettingPreviewModifiable[] = "previewModifiable";
148
149 // Keys that specifies the printable area details.
150 const char kSettingPrintableAreaX[] = "printableAreaX";
151 const char kSettingPrintableAreaY[] = "printableAreaY";
152 const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
153 const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
154
155 // Printer name.
156 const char kSettingPrinterName[] = "printerName";
157
158 // Printer description.
159 const char kSettingPrinterDescription[] = "printerDescription";
160
161 // Additional printer options.
162 const char kSettingPrinterOptions[] = "printerOptions";
163
164 // Print to Google Drive option: true if selected, false if not.
165 const char kSettingPrintToGoogleDrive[] = "printToGoogleDrive";
166
167 // Print to PDF option: true if selected, false if not.
168 const char kSettingPrintToPDF[] = "printToPDF";
169
170 // Print using Privet option: true if destination is a Privet printer, false if
171 // not.
172 const char kSettingPrintWithPrivet[] = "printWithPrivet";
173
174 // Print using extension option: true if destination is an extension printer,
175 // false if not.
176 const char kSettingPrintWithExtension[] = "printWithExtension";
177
178 // Scaling factor
179 const char kSettingScaleFactor[] = "scaleFactor";
180
181 // Number of pages per sheet.
182 const char kSettingPagesPerSheet[] = "pagesPerSheet";
183
184 // Whether to rasterize the PDF for printing.
185 const char kSettingRasterizePdf[] = "rasterizePDF";
186
187 // Ticket option. Contains the ticket in CJT format.
188 const char kSettingTicket[] = "ticket";
189
190 // Whether to print CSS backgrounds.
191 const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds";
192
193 // Whether to print selection only.
194 const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly";
195
196 // Whether to print using the system dialog.
197 const char kSettingShowSystemDialog[] = "showSystemDialog";
198
199 // Indices used to represent first preview page and complete preview document.
200 const int FIRST_PAGE_INDEX = 0;
201 const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
202
203 // Whether to show PDF in view provided by OS. Implemented for MacOS only.
204 const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview";
205
206 #if defined (USE_CUPS)
207 const char kBlack[] = "Black";
208 const char kCMYK[] = "CMYK";
209 const char kKCMY[] = "KCMY";
210 const char kCMY_K[] = "CMY+K";
211 const char kCMY[] = "CMY";
212 const char kColor[] = "Color";
213 const char kFullColor[] = "FullColor";
214 const char kGray[] = "Gray";
215 const char kGrayscale[] = "Grayscale";
216 const char kGreyscale[] = "Greyscale";
217 const char kMono[] = "Mono";
218 const char kMonochrome[] = "Monochrome";
219 const char kNormal[] = "Normal";
220 const char kNormalGray[] = "Normal.Gray";
221 const char kRGB[] = "RGB";
222 const char kRGBA[] = "RGBA";
223 const char kRGB16[] = "RGB16";
224 #endif
225
226 }  // namespace printing