Enable chrome with aura for tizen
[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 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 job setting 'collate'.
24 const char kSettingCollate[] = "collate";
25
26 // Print out color. Value is an int from ColorModel enum.
27 const char kSettingColor[] = "color";
28
29 // Default to color on or not.
30 const char kSettingSetColorAsDefault[] = "setColorAsDefault";
31
32 // Key that specifies the height of the content area of the page.
33 const char kSettingContentHeight[] = "contentHeight";
34
35 // Key that specifies the width of the content area of the page.
36 const char kSettingContentWidth[] = "contentWidth";
37
38 // Number of copies.
39 const char kSettingCopies[] = "copies";
40
41 // Device name: Unique printer identifier.
42 const char kSettingDeviceName[] = "deviceName";
43
44 // Option to disable scaling. True if scaling is disabled else false.
45 const char kSettingDisableScaling[] = "disableScaling";
46
47 // Default DPI
48 const char kSettingDpiDefault[] = "dpiDefault";
49
50 // Horizontal DPI
51 const char kSettingDpiHorizontal[] = "dpiHorizontal";
52
53 // Vertical DPI
54 const char kSettingDpiVertical[] = "dpiVertical";
55
56 // Scaling value required to fit the document to page.
57 const char kSettingFitToPageScaling[] = "fitToPageScaling";
58
59 // Print job duplex mode. Value is an int from DuplexMode enum.
60 const char kSettingDuplexMode[] = "duplex";
61
62 // Option to print headers and Footers: true if selected, false if not.
63 const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
64
65 // Interstice or gap between different header footer components. Hardcoded to
66 // about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea.
67 const float kSettingHeaderFooterInterstice = 14.2f;
68
69 // Key that specifies the date of the page that will be printed in the headers
70 // and footers.
71 const char kSettingHeaderFooterDate[] = "date";
72
73 // Key that specifies the title of the page that will be printed in the headers
74 // and footers.
75 const char kSettingHeaderFooterTitle[] = "title";
76
77 // Key that specifies the URL of the page that will be printed in the headers
78 // and footers.
79 const char kSettingHeaderFooterURL[] = "url";
80
81 // Page orientation: true for landscape, false for portrait.
82 const char kSettingLandscape[] = "landscape";
83
84 // Key that specifies the requested media size.
85 const char kSettingMediaSize[] = "mediaSize";
86
87 // Key that specifies the requested media height in microns.
88 const char kSettingMediaSizeHeightMicrons[] = "height_microns";
89
90 // Key that specifies the requested media width in microns.
91 const char kSettingMediaSizeWidthMicrons[] = "width_microns";
92
93 // Key that specifies the left side of the bounding box for the requested
94 // media's printable area.
95 const char kSettingsImageableAreaLeftMicrons[] = "imageable_area_left_microns";
96
97 // Key that specifies the bottom side of the bounding box for the requested
98 // media's printable area.
99 const char kSettingsImageableAreaBottomMicrons[] =
100     "imageable_area_bottom_microns";
101
102 // Key that specifies the right side of the bounding box for the requested
103 // media's printable area.
104 const char kSettingsImageableAreaRightMicrons[] =
105     "imageable_area_right_microns";
106
107 // Key that specifies the top side of the bounding box for the requested
108 // media's printable area.
109 const char kSettingsImageableAreaTopMicrons[] = "imageable_area_top_microns";
110
111 // Key that specifies the requested media platform specific vendor id.
112 const char kSettingMediaSizeVendorId[] = "vendor_id";
113
114 // Key that specifies whether the requested media is a default one.
115 const char kSettingMediaSizeIsDefault[] = "is_default";
116
117 // Key that specifies the bottom margin of the page.
118 const char kSettingMarginBottom[] = "marginBottom";
119
120 // Key that specifies the left margin of the page.
121 const char kSettingMarginLeft[] = "marginLeft";
122
123 // Key that specifies the right margin of the page.
124 const char kSettingMarginRight[] = "marginRight";
125
126 // Key that specifies the top margin of the page.
127 const char kSettingMarginTop[] = "marginTop";
128
129 // Key that specifies the dictionary of custom margins as set by the user.
130 const char kSettingMarginsCustom[] = "marginsCustom";
131
132 // Key that specifies the type of margins to use.  Value is an int from the
133 // MarginType enum.
134 const char kSettingMarginsType[] = "marginsType";
135
136 // Number of pages to print.
137 const char kSettingPreviewPageCount[] = "pageCount";
138
139 // A page range.
140 const char kSettingPageRange[] = "pageRange";
141
142 // The first page of a page range. (1-based)
143 const char kSettingPageRangeFrom[] = "from";
144
145 // The last page of a page range. (1-based)
146 const char kSettingPageRangeTo[] = "to";
147
148 // Page size of document to print.
149 const char kSettingPageWidth[] = "pageWidth";
150 const char kSettingPageHeight[] = "pageHeight";
151
152 // PIN code entered by the user.
153 const char kSettingPinValue[] = "pinValue";
154
155 // Policies affecting printing destination.
156 const char kSettingPolicies[] = "policies";
157
158 // Whether the source page content is from ARC or not.
159 const char kSettingPreviewIsFromArc[] = "previewIsFromArc";
160
161 // Whether the source page content is modifiable. True for web content.
162 // i.e. Anything from Blink. False for everything else. e.g. PDF/Flash.
163 const char kSettingPreviewModifiable[] = "previewModifiable";
164
165 // Keys that specifies the printable area details.
166 const char kSettingPrintableAreaX[] = "printableAreaX";
167 const char kSettingPrintableAreaY[] = "printableAreaY";
168 const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
169 const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
170
171 // Printer description.
172 const char kSettingPrinterDescription[] = "printerDescription";
173
174 // Printer name.
175 const char kSettingPrinterName[] = "printerName";
176
177 // Additional printer options.
178 const char kSettingPrinterOptions[] = "printerOptions";
179
180 // The printer type is an enum PrinterType.
181 const char kSettingPrinterType[] = "printerType";
182
183 // Print to Google Drive option: true if selected, false if not.
184 const char kSettingPrintToGoogleDrive[] = "printToGoogleDrive";
185
186 // Scaling factor
187 const char kSettingScaleFactor[] = "scaleFactor";
188
189 // Scaling type
190 const char kSettingScalingType[] = "scalingType";
191
192 // Number of pages per sheet.
193 const char kSettingPagesPerSheet[] = "pagesPerSheet";
194
195 // Whether to rasterize the PDF for printing.
196 const char kSettingRasterizePdf[] = "rasterizePDF";
197
198 // The DPI override to use when rasterize the PDF for printing.
199 const char kSettingRasterizePdfDpi[] = "rasterizePdfDpi";
200
201 // Ticket option. Contains the ticket in CJT format.
202 const char kSettingTicket[] = "ticket";
203
204 // Whether to sent user info to the printer.
205 const char kSettingSendUserInfo[] = "sendUserInfo";
206
207 // Whether to print CSS backgrounds.
208 const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds";
209
210 // Whether to print selection only.
211 const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly";
212
213 // Whether to print using the system dialog.
214 const char kSettingShowSystemDialog[] = "showSystemDialog";
215
216 // Username to be sent to printer.
217 const char kSettingUsername[] = "username";
218
219 // Advanced settings items.
220 const char kSettingAdvancedSettings[] = "advancedSettings";
221
222 // Indices used to represent first preview page and complete preview document.
223 const int FIRST_PAGE_INDEX = 0;
224 const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
225
226 // Whether to show PDF in view provided by OS. Implemented for MacOS only.
227 const char kSettingOpenPDFInPreview[] = "openPDFInPreview";
228
229 const uint32_t kInvalidPageIndex = std::numeric_limits<int>::max();
230 const uint32_t kMaxPageCount = std::numeric_limits<int>::max();
231
232 #if defined(USE_CUPS)
233 const char kBlack[] = "Black";
234 const char kCMYK[] = "CMYK";
235 const char kKCMY[] = "KCMY";
236 const char kCMY_K[] = "CMY+K";
237 const char kCMY[] = "CMY";
238 const char kColor[] = "Color";
239 const char kEpsonColor[] = "COLOR";
240 const char kEpsonMono[] = "MONO";
241 const char kFullColor[] = "FullColor";
242 const char kGray[] = "Gray";
243 const char kGrayscale[] = "Grayscale";
244 const char kGreyscale[] = "Greyscale";
245 const char kMono[] = "Mono";
246 const char kMonochrome[] = "Monochrome";
247 const char kNormal[] = "Normal";
248 const char kNormalGray[] = "Normal.Gray";
249 const char kRGB[] = "RGB";
250 const char kRGBA[] = "RGBA";
251 const char kRGB16[] = "RGB16";
252 const char kSharpCMColor[] = "CMColor";
253 const char kSharpCMBW[] = "CMBW";
254 const char kXeroxAutomatic[] = "Automatic";
255 const char kXeroxBW[] = "BW";
256 #endif
257
258 }  // namespace printing