[Sync] Move DataTypeStatusTable ownership into DataTypeManager.
[chromium-blink-merge.git] / printing / print_job_constants.cc
blobed4d1e2f595be980157fb9e2ab94bbfd5de4cc25
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 of Print Preview initiator host.
16 const char kPreviewInitiatorHostId[] = "previewInitiatorHostId";
18 // Routing ID of Print Preview initiator.
19 const char kPreviewInitiatorRoutingId[] = "previewInitiatorRoutingId";
21 // Unique ID to identify a print preview UI.
22 const char kPreviewUIID[] = "previewUIID";
24 // Capabilities option. Contains the capabilities in CDD format.
25 const char kSettingCapabilities[] = "capabilities";
27 // Print using cloud print: true if selected, false if not.
28 const char kSettingCloudPrintId[] = "cloudPrintID";
30 // Print using cloud print dialog: true if selected, false if not.
31 const char kSettingCloudPrintDialog[] = "printWithCloudPrint";
33 // Print job setting 'collate'.
34 const char kSettingCollate[] = "collate";
36 // Print out color: true for color, false for grayscale.
37 const char kSettingColor[] = "color";
39 // Default to color on or not.
40 const char kSettingSetColorAsDefault[] = "setColorAsDefault";
42 // Key that specifies the height of the content area of the page.
43 const char kSettingContentHeight[] = "contentHeight";
45 // Key that specifies the width of the content area of the page.
46 const char kSettingContentWidth[] = "contentWidth";
48 // Number of copies.
49 const char kSettingCopies[] = "copies";
51 // Device name: Unique printer identifier.
52 const char kSettingDeviceName[] = "deviceName";
54 // Print job duplex mode.
55 const char kSettingDuplexMode[] = "duplex";
57 // Option to fit source page contents to printer paper size: true if
58 // selected else false.
59 const char kSettingFitToPageEnabled[] = "fitToPageEnabled";
61 // True, when a new set of draft preview data is required.
62 const char kSettingGenerateDraftData[] = "generateDraftData";
64 // Option to print headers and Footers: true if selected, false if not.
65 const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
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;
71 // Key that specifies the date of the page that will be printed in the headers
72 // and footers.
73 const char kSettingHeaderFooterDate[] = "date";
75 // Key that specifies the title of the page that will be printed in the headers
76 // and footers.
77 const char kSettingHeaderFooterTitle[] = "title";
79 // Key that specifies the URL of the page that will be printed in the headers
80 // and footers.
81 const char kSettingHeaderFooterURL[] = "url";
83 // Page orientation: true for landscape, false for portrait.
84 const char kSettingLandscape[] = "landscape";
86 // Key that specifies the requested media size.
87 const char kSettingMediaSize[] = "mediaSize";
89 // Key that specifies the requested media height in microns.
90 const char kSettingMediaSizeHeightMicrons[] = "height_microns";
92 // Key that specifies the requested media width in microns.
93 const char kSettingMediaSizeWidthMicrons[] = "width_microns";
95 // Key that specifies the requested media platform specific vendor id.
96 const char kSettingMediaSizeVendorId[] = "vendor_id";
98 // Key that specifies the bottom margin of the page.
99 const char kSettingMarginBottom[] = "marginBottom";
101 // Key that specifies the left margin of the page.
102 const char kSettingMarginLeft[] = "marginLeft";
104 // Key that specifies the right margin of the page.
105 const char kSettingMarginRight[] = "marginRight";
107 // Key that specifies the top margin of the page.
108 const char kSettingMarginTop[] = "marginTop";
110 // Key that specifies the dictionary of custom margins as set by the user.
111 const char kSettingMarginsCustom[] = "marginsCustom";
113 // Key that specifies the type of margins to use. Value is an int from the
114 // MarginType enum.
115 const char kSettingMarginsType[] = "marginsType";
117 // Number of pages to print.
118 const char kSettingPreviewPageCount[] = "pageCount";
120 // A page range.
121 const char kSettingPageRange[] = "pageRange";
123 // The first page of a page range. (1-based)
124 const char kSettingPageRangeFrom[] = "from";
126 // The last page of a page range. (1-based)
127 const char kSettingPageRangeTo[] = "to";
129 // Page size of document to print.
130 const char kSettingPageWidth[] = "pageWidth";
131 const char kSettingPageHeight[] = "pageHeight";
133 const char kSettingPreviewModifiable[] = "previewModifiable";
135 // Keys that specifies the printable area details.
136 const char kSettingPrintableAreaX[] = "printableAreaX";
137 const char kSettingPrintableAreaY[] = "printableAreaY";
138 const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
139 const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
141 // Printer name.
142 const char kSettingPrinterName[] = "printerName";
144 // Printer description.
145 const char kSettingPrinterDescription[] = "printerDescription";
147 // Additional printer options.
148 const char kSettingPrinterOptions[] = "printerOptions";
150 // Print to PDF option: true if selected, false if not.
151 const char kSettingPrintToPDF[] = "printToPDF";
153 // Print using Privet option: true if destination is a Privet printer, false if
154 // not.
155 const char kSettingPrintWithPrivet[] = "printWithPrivet";
157 // Ticket option. Contains the ticket in CJT format.
158 const char kSettingTicket[] = "ticket";
160 // Whether to print CSS backgrounds.
161 const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds";
163 // Whether to print selection only.
164 const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly";
166 // Whether to print selection only.
167 const char kSettingShowSystemDialog[] = "showSystemDialog";
169 // Indices used to represent first preview page and complete preview document.
170 const int FIRST_PAGE_INDEX = 0;
171 const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
173 // Whether to show PDF in view provided by OS. Implemented for MacOS only.
174 const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview";
176 #if defined (USE_CUPS)
177 const char kBlack[] = "Black";
178 const char kCMYK[] = "CMYK";
179 const char kKCMY[] = "KCMY";
180 const char kCMY_K[] = "CMY+K";
181 const char kCMY[] = "CMY";
182 const char kColor[] = "Color";
183 const char kGray[] = "Gray";
184 const char kGrayscale[] = "Grayscale";
185 const char kGreyscale[] = "Greyscale";
186 const char kMonochrome[] = "Monochrome";
187 const char kNormal[] = "Normal";
188 const char kNormalGray[] = "Normal.Gray";
189 const char kRGB[] = "RGB";
190 const char kRGBA[] = "RGBA";
191 const char kRGB16[] = "RGB16";
192 #endif
194 } // namespace printing