[M120 Migration][MM] Fix EME AD insert issue
[platform/framework/web/chromium-efl.git] / printing / print_job_constants.cc
1 // Copyright 2012 The Chromium Authors
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 <limits>
8
9 #include "build/build_config.h"
10
11 namespace printing {
12
13 // True if this is the first preview request.
14 const char kIsFirstRequest[] = "isFirstRequest";
15
16 // Unique ID sent along every preview request.
17 const char kPreviewRequestID[] = "requestID";
18
19 // Unique ID to identify a print preview UI.
20 const char kPreviewUIID[] = "previewUIID";
21
22 // If true, tell the printer to print without margins.
23 const char kSettingBorderless[] = "borderless";
24
25 // Capabilities option. Contains the capabilities in CDD format.
26 const char kSettingCapabilities[] = "capabilities";
27
28 // Print job setting 'collate'.
29 const char kSettingCollate[] = "collate";
30
31 // Print out color. Value is an int from ColorModel enum.
32 const char kSettingColor[] = "color";
33
34 // Default to color on or not.
35 const char kSettingSetColorAsDefault[] = "setColorAsDefault";
36
37 // Key that specifies the height of the content area of the page.
38 const char kSettingContentHeight[] = "contentHeight";
39
40 // Key that specifies the width of the content area of the page.
41 const char kSettingContentWidth[] = "contentWidth";
42
43 // Number of copies.
44 const char kSettingCopies[] = "copies";
45
46 // Device name: Unique printer identifier.
47 const char kSettingDeviceName[] = "deviceName";
48
49 // Option to disable scaling. True if scaling is disabled else false.
50 const char kSettingDisableScaling[] = "disableScaling";
51
52 // Default DPI
53 const char kSettingDpiDefault[] = "dpiDefault";
54
55 // Horizontal DPI
56 const char kSettingDpiHorizontal[] = "dpiHorizontal";
57
58 // Vertical DPI
59 const char kSettingDpiVertical[] = "dpiVertical";
60
61 // Print job duplex mode. Value is an int from DuplexMode enum.
62 const char kSettingDuplexMode[] = "duplex";
63
64 // Option to print headers and Footers: true if selected, false if not.
65 const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
66
67 // Interstice or gap between different header footer components. Hardcoded to
68 // about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea.
69 const float kSettingHeaderFooterInterstice = 14.2f;
70
71 // Key that specifies the date of the page that will be printed in the headers
72 // and footers.
73 const char kSettingHeaderFooterDate[] = "date";
74
75 // Key that specifies the title of the page that will be printed in the headers
76 // and footers.
77 const char kSettingHeaderFooterTitle[] = "title";
78
79 // Key that specifies the URL of the page that will be printed in the headers
80 // and footers.
81 const char kSettingHeaderFooterURL[] = "url";
82
83 // Page orientation: true for landscape, false for portrait.
84 const char kSettingLandscape[] = "landscape";
85
86 // Key that specifies the requested media size.
87 const char kSettingMediaSize[] = "mediaSize";
88
89 // Key that specifies the requested media height in microns.
90 const char kSettingMediaSizeHeightMicrons[] = "height_microns";
91
92 // Key that specifies the requested media width in microns.
93 const char kSettingMediaSizeWidthMicrons[] = "width_microns";
94
95 // Key that specifies the left side of the bounding box for the requested
96 // media's printable area.
97 const char kSettingsImageableAreaLeftMicrons[] = "imageable_area_left_microns";
98
99 // Key that specifies the bottom side of the bounding box for the requested
100 // media's printable area.
101 const char kSettingsImageableAreaBottomMicrons[] =
102     "imageable_area_bottom_microns";
103
104 // Key that specifies the right side of the bounding box for the requested
105 // media's printable area.
106 const char kSettingsImageableAreaRightMicrons[] =
107     "imageable_area_right_microns";
108
109 // Key that specifies the top side of the bounding box for the requested
110 // media's printable area.
111 const char kSettingsImageableAreaTopMicrons[] = "imageable_area_top_microns";
112
113 // Key that specifies the requested media platform specific vendor id.
114 const char kSettingMediaSizeVendorId[] = "vendor_id";
115
116 // Key that specifies whether the requested media is a default one.
117 const char kSettingMediaSizeIsDefault[] = "is_default";
118
119 // Key that specifies the requested media type (plain, photo paper, etc.)
120 const char kSettingMediaType[] = "mediaType";
121
122 // Key that specifies the bottom margin of the page.
123 const char kSettingMarginBottom[] = "marginBottom";
124
125 // Key that specifies the left margin of the page.
126 const char kSettingMarginLeft[] = "marginLeft";
127
128 // Key that specifies the right margin of the page.
129 const char kSettingMarginRight[] = "marginRight";
130
131 // Key that specifies the top margin of the page.
132 const char kSettingMarginTop[] = "marginTop";
133
134 // Key that specifies the dictionary of custom margins as set by the user.
135 const char kSettingMarginsCustom[] = "marginsCustom";
136
137 // Key that specifies the type of margins to use.  Value is an int from the
138 // MarginType enum.
139 const char kSettingMarginsType[] = "marginsType";
140
141 // Number of pages to print.
142 const char kSettingPreviewPageCount[] = "pageCount";
143
144 // A page range.
145 const char kSettingPageRange[] = "pageRange";
146
147 // The first page of a page range. (1-based)
148 const char kSettingPageRangeFrom[] = "from";
149
150 // The last page of a page range. (1-based)
151 const char kSettingPageRangeTo[] = "to";
152
153 // Page size of document to print.
154 const char kSettingPageWidth[] = "pageWidth";
155 const char kSettingPageHeight[] = "pageHeight";
156
157 // PIN code entered by the user.
158 const char kSettingPinValue[] = "pinValue";
159
160 // Policies affecting printing destination.
161 const char kSettingPolicies[] = "policies";
162
163 // Whether the source page content is from ARC or not.
164 const char kSettingPreviewIsFromArc[] = "previewIsFromArc";
165
166 // Whether the source page content is modifiable. True for web content.
167 // i.e. Anything from Blink. False for everything else. e.g. PDF/Flash.
168 const char kSettingPreviewModifiable[] = "previewModifiable";
169
170 // Keys that specifies the printable area details.
171 const char kSettingPrintableAreaX[] = "printableAreaX";
172 const char kSettingPrintableAreaY[] = "printableAreaY";
173 const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
174 const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
175
176 // Printer description.
177 const char kSettingPrinterDescription[] = "printerDescription";
178
179 // Printer name.
180 const char kSettingPrinterName[] = "printerName";
181
182 // Additional printer options.
183 const char kSettingPrinterOptions[] = "printerOptions";
184
185 // The printer type is an enum PrinterType.
186 const char kSettingPrinterType[] = "printerType";
187
188 // Print to Google Drive option: true if selected, false if not.
189 const char kSettingPrintToGoogleDrive[] = "printToGoogleDrive";
190
191 // Scaling factor
192 const char kSettingScaleFactor[] = "scaleFactor";
193
194 // Scaling type
195 const char kSettingScalingType[] = "scalingType";
196
197 // Number of pages per sheet.
198 const char kSettingPagesPerSheet[] = "pagesPerSheet";
199
200 // Whether to rasterize the PDF for printing.
201 const char kSettingRasterizePdf[] = "rasterizePDF";
202
203 // The DPI override to use when rasterize the PDF for printing.
204 const char kSettingRasterizePdfDpi[] = "rasterizePdfDpi";
205
206 // Ticket option. Contains the ticket in CJT format.
207 const char kSettingTicket[] = "ticket";
208
209 // Whether to sent user info to the printer.
210 const char kSettingSendUserInfo[] = "sendUserInfo";
211
212 // Whether to print CSS backgrounds.
213 const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds";
214
215 // Whether to print selection only.
216 const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly";
217
218 // Whether to print using the system dialog.
219 const char kSettingShowSystemDialog[] = "showSystemDialog";
220
221 // Username to be sent to printer.
222 const char kSettingUsername[] = "username";
223
224 // Advanced settings items.
225 const char kSettingAdvancedSettings[] = "advancedSettings";
226
227 // Indices used to represent first preview page and complete preview document.
228 const int FIRST_PAGE_INDEX = 0;
229 const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
230
231 // Whether to show PDF in view provided by OS. Implemented for MacOS only.
232 const char kSettingOpenPDFInPreview[] = "openPDFInPreview";
233
234 const uint32_t kInvalidPageIndex = std::numeric_limits<int>::max();
235 const uint32_t kMaxPageCount = std::numeric_limits<int>::max();
236
237 #if BUILDFLAG(IS_CHROMEOS)
238 // If set, contains OAuth token that must be used during communication with the
239 // printer.
240 const char kSettingChromeOSAccessOAuthToken[] = "chromeos-access-oauth-token";
241
242 // These correspond to IPP 'client-info' attribute and member attributes. If
243 // set, 'client-info' will be sent in the IPP print job.
244 const char kSettingIppClientInfo[] = "ipp-client-info";
245 const char kSettingIppClientName[] = "ipp-client-name";
246 const char kSettingIppClientPatches[] = "ipp-client-patches";
247 const char kSettingIppClientStringVersion[] = "ipp-client-string-version";
248 const char kSettingIppClientType[] = "ipp-client-type";
249 const char kSettingIppClientVersion[] = "ipp-client-version";
250
251 // True if the user selects to print to a different printer than the original
252 // destination shown when Print Preview opens.
253 const char kSettingPrinterManuallySelected[] = "printerManuallySelected";
254
255 // The printer status reason shown for the selected printer at the time print
256 // is requested. Only local CrOS printers set printer statuses.
257 const char kSettingPrinterStatusReason[] = "printerStatusReason";
258 #endif  // BUILDFLAG(IS_CHROMEOS)
259
260 }  // namespace printing