[email protected] | 0e77a1d | 2012-03-20 03:10:20 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 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 | namespace printing { | ||||
8 | |||||
[email protected] | 718af82 | 2011-08-12 22:11:33 | [diff] [blame] | 9 | // True if this is the first preview request. |
10 | const char kIsFirstRequest[] = "isFirstRequest"; | ||||
11 | |||||
[email protected] | a885135 | 2011-07-13 20:16:25 | [diff] [blame] | 12 | // Unique ID sent along every preview request. |
13 | const char kPreviewRequestID[] = "requestID"; | ||||
14 | |||||
[email protected] | ff90674 | 2011-08-23 05:04:46 | [diff] [blame] | 15 | // Unique ID to identify a print preview UI. |
[email protected] | 116d096 | 2012-08-24 23:22:28 | [diff] [blame] | 16 | const char kPreviewUIID[] = "previewUIID"; |
[email protected] | ff90674 | 2011-08-23 05:04:46 | [diff] [blame] | 17 | |
[email protected] | 833cac8 | 2014-03-22 04:58:41 | [diff] [blame] | 18 | // Capabilities option. Contains the capabilities in CDD format. |
19 | const char kSettingCapabilities[] = "capabilities"; | ||||
20 | |||||
[email protected] | b579afd | 2011-07-13 00:01:27 | [diff] [blame] | 21 | // Print using cloud print: true if selected, false if not. |
22 | const char kSettingCloudPrintId[] = "cloudPrintID"; | ||||
23 | |||||
[email protected] | f0be15bd | 2011-09-28 20:50:04 | [diff] [blame] | 24 | // Print using cloud print dialog: true if selected, false if not. |
25 | const char kSettingCloudPrintDialog[] = "printWithCloudPrint"; | ||||
26 | |||||
[email protected] | c97e5e8 | 2011-04-05 18:50:23 | [diff] [blame] | 27 | // Print job setting 'collate'. |
28 | const char kSettingCollate[] = "collate"; | ||||
29 | |||||
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 30 | // Print out color: true for color, false for grayscale. |
31 | const char kSettingColor[] = "color"; | ||||
32 | |||||
[email protected] | 0209b44 | 2012-07-18 00:38:05 | [diff] [blame] | 33 | // Default to color on or not. |
34 | const char kSettingSetColorAsDefault[] = "setColorAsDefault"; | ||||
35 | |||||
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 36 | // Key that specifies the height of the content area of the page. |
37 | const char kSettingContentHeight[] = "contentHeight"; | ||||
38 | |||||
39 | // Key that specifies the width of the content area of the page. | ||||
40 | const char kSettingContentWidth[] = "contentWidth"; | ||||
41 | |||||
[email protected] | c97e5e8 | 2011-04-05 18:50:23 | [diff] [blame] | 42 | // Number of copies. |
43 | const char kSettingCopies[] = "copies"; | ||||
44 | |||||
[email protected] | 987e51f9 | 2011-05-04 21:10:15 | [diff] [blame] | 45 | // Device name: Unique printer identifier. |
46 | const char kSettingDeviceName[] = "deviceName"; | ||||
47 | |||||
[email protected] | 826e63a16 | 2011-04-20 18:00:45 | [diff] [blame] | 48 | // Print job duplex mode. |
49 | const char kSettingDuplexMode[] = "duplex"; | ||||
50 | |||||
[email protected] | 7a3439b | 2012-05-16 20:32:14 | [diff] [blame] | 51 | // Option to fit source page contents to printer paper size: true if |
52 | // selected else false. | ||||
53 | const char kSettingFitToPageEnabled[] = "fitToPageEnabled"; | ||||
54 | |||||
[email protected] | 576f9964 | 2011-08-31 05:19:41 | [diff] [blame] | 55 | // True, when a new set of draft preview data is required. |
56 | const char kSettingGenerateDraftData[] = "generateDraftData"; | ||||
57 | |||||
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 58 | // Option to print headers and Footers: true if selected, false if not. |
59 | const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled"; | ||||
60 | |||||
[email protected] | 06bd1866 | 2011-10-07 06:12:40 | [diff] [blame] | 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; | ||||
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 64 | |
65 | // Key that specifies the date of the page that will be printed in the headers | ||||
66 | // and footers. | ||||
67 | const char kSettingHeaderFooterDate[] = "date"; | ||||
68 | |||||
69 | // Key that specifies the title of the page that will be printed in the headers | ||||
70 | // and footers. | ||||
71 | const char kSettingHeaderFooterTitle[] = "title"; | ||||
72 | |||||
73 | // Key that specifies the URL of the page that will be printed in the headers | ||||
74 | // and footers. | ||||
75 | const char kSettingHeaderFooterURL[] = "url"; | ||||
76 | |||||
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 77 | // Page orientation: true for landscape, false for portrait. |
78 | const char kSettingLandscape[] = "landscape"; | ||||
79 | |||||
[email protected] | ae98e57 | 2014-05-14 23:52:55 | [diff] [blame] | 80 | // Key that specifies the requested media size. |
81 | const char kSettingMediaSize[] = "mediaSize"; | ||||
82 | |||||
83 | // Key that specifies the requested media height in microns. | ||||
84 | const char kSettingMediaSizeHeightMicrons[] = "height_microns"; | ||||
85 | |||||
86 | // Key that specifies the requested media width in microns. | ||||
87 | const char kSettingMediaSizeWidthMicrons[] = "width_microns"; | ||||
88 | |||||
[email protected] | 72ddef9 | 2014-06-12 08:08:06 | [diff] [blame] | 89 | // Key that specifies the requested media platform specific vendor id. |
90 | const char kSettingMediaSizeVendorId[] = "vendor_id"; | ||||
91 | |||||
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 92 | // Key that specifies the bottom margin of the page. |
93 | const char kSettingMarginBottom[] = "marginBottom"; | ||||
94 | |||||
95 | // Key that specifies the left margin of the page. | ||||
96 | const char kSettingMarginLeft[] = "marginLeft"; | ||||
97 | |||||
98 | // Key that specifies the right margin of the page. | ||||
99 | const char kSettingMarginRight[] = "marginRight"; | ||||
100 | |||||
101 | // Key that specifies the top margin of the page. | ||||
102 | const char kSettingMarginTop[] = "marginTop"; | ||||
103 | |||||
[email protected] | 6a7fdfd | 2011-10-13 09:05:42 | [diff] [blame] | 104 | // Key that specifies the dictionary of custom margins as set by the user. |
105 | const char kSettingMarginsCustom[] = "marginsCustom"; | ||||
106 | |||||
107 | // Key that specifies the type of margins to use. Value is an int from the | ||||
108 | // MarginType enum. | ||||
109 | const char kSettingMarginsType[] = "marginsType"; | ||||
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 110 | |
[email protected] | 82b6e0fc | 2013-02-12 01:28:20 | [diff] [blame] | 111 | // Number of pages to print. |
112 | const char kSettingPreviewPageCount[] = "pageCount"; | ||||
113 | |||||
[email protected] | 06cb2388 | 2011-04-23 01:58:22 | [diff] [blame] | 114 | // A page range. |
115 | const char kSettingPageRange[] = "pageRange"; | ||||
116 | |||||
117 | // The first page of a page range. (1-based) | ||||
118 | const char kSettingPageRangeFrom[] = "from"; | ||||
119 | |||||
120 | // The last page of a page range. (1-based) | ||||
121 | const char kSettingPageRangeTo[] = "to"; | ||||
122 | |||||
[email protected] | 3c0bcfa | 2013-11-21 22:47:00 | [diff] [blame] | 123 | // Page size of document to print. |
124 | const char kSettingPageWidth[] = "pageWidth"; | ||||
125 | const char kSettingPageHeight[] = "pageHeight"; | ||||
126 | |||||
[email protected] | d75a0317e | 2011-10-17 20:20:40 | [diff] [blame] | 127 | const char kSettingPreviewModifiable[] = "previewModifiable"; |
128 | |||||
[email protected] | 0e77a1d | 2012-03-20 03:10:20 | [diff] [blame] | 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"; | ||||
134 | |||||
[email protected] | f803c93 | 2011-03-30 16:40:12 | [diff] [blame] | 135 | // Printer name. |
136 | const char kSettingPrinterName[] = "printerName"; | ||||
137 | |||||
[email protected] | 6df7b5a | 2014-03-29 17:39:47 | [diff] [blame] | 138 | // Printer description. |
139 | const char kSettingPrinterDescription[] = "printerDescription"; | ||||
140 | |||||
141 | // Additional printer options. | ||||
142 | const char kSettingPrinterOptions[] = "printerOptions"; | ||||
143 | |||||
[email protected] | b73bb80b | 2011-04-20 01:58:39 | [diff] [blame] | 144 | // Print to PDF option: true if selected, false if not. |
145 | const char kSettingPrintToPDF[] = "printToPDF"; | ||||
146 | |||||
[email protected] | 014a62cb | 2013-11-09 17:23:25 | [diff] [blame] | 147 | // Print using Privet option: true if destination is a Privet printer, false if |
148 | // not. | ||||
149 | const char kSettingPrintWithPrivet[] = "printWithPrivet"; | ||||
150 | |||||
151 | // Ticket option. Contains the ticket in CJT format. | ||||
152 | const char kSettingTicket[] = "ticket"; | ||||
153 | |||||
[email protected] | 19d1c2d | 2013-01-14 00:59:46 | [diff] [blame] | 154 | // Whether to print CSS backgrounds. |
155 | const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds"; | ||||
156 | |||||
[email protected] | edb363a8 | 2013-01-29 12:11:29 | [diff] [blame] | 157 | // Whether to print selection only. |
158 | const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly"; | ||||
159 | |||||
[email protected] | ff90674 | 2011-08-23 05:04:46 | [diff] [blame] | 160 | // Indices used to represent first preview page and complete preview document. |
[email protected] | fd0b50340 | 2011-07-26 09:01:33 | [diff] [blame] | 161 | const int FIRST_PAGE_INDEX = 0; |
162 | const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1; | ||||
[email protected] | fd0b50340 | 2011-07-26 09:01:33 | [diff] [blame] | 163 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 164 | // Whether to show PDF in view provided by OS. Implemented for MacOS only. |
[email protected] | 97c29575 | 2011-11-17 00:44:37 | [diff] [blame] | 165 | const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview"; |
[email protected] | 97c29575 | 2011-11-17 00:44:37 | [diff] [blame] | 166 | |
[email protected] | 63313ae | 2011-10-13 00:40:39 | [diff] [blame] | 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 | ||||
184 | |||||
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 185 | } // namespace printing |