[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 | |
Vitaly Buka | bd7c981 | 2014-08-26 08:57:54 | [diff] [blame] | 15 | // Unique ID of Print Preview initiator host. |
| 16 | const char kPreviewInitiatorHostId[] = "previewInitiatorHostId"; |
| 17 | |
| 18 | // Routing ID of Print Preview initiator. |
| 19 | const char kPreviewInitiatorRoutingId[] = "previewInitiatorRoutingId"; |
| 20 | |
[email protected] | ff90674 | 2011-08-23 05:04:46 | [diff] [blame] | 21 | // Unique ID to identify a print preview UI. |
[email protected] | 116d096 | 2012-08-24 23:22:28 | [diff] [blame] | 22 | const char kPreviewUIID[] = "previewUIID"; |
[email protected] | ff90674 | 2011-08-23 05:04:46 | [diff] [blame] | 23 | |
[email protected] | 833cac8 | 2014-03-22 04:58:41 | [diff] [blame] | 24 | // Capabilities option. Contains the capabilities in CDD format. |
| 25 | const char kSettingCapabilities[] = "capabilities"; |
| 26 | |
[email protected] | b579afd | 2011-07-13 00:01:27 | [diff] [blame] | 27 | // Print using cloud print: true if selected, false if not. |
| 28 | const char kSettingCloudPrintId[] = "cloudPrintID"; |
| 29 | |
[email protected] | f0be15bd | 2011-09-28 20:50:04 | [diff] [blame] | 30 | // Print using cloud print dialog: true if selected, false if not. |
| 31 | const char kSettingCloudPrintDialog[] = "printWithCloudPrint"; |
| 32 | |
[email protected] | c97e5e8 | 2011-04-05 18:50:23 | [diff] [blame] | 33 | // Print job setting 'collate'. |
| 34 | const char kSettingCollate[] = "collate"; |
| 35 | |
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 36 | // Print out color: true for color, false for grayscale. |
| 37 | const char kSettingColor[] = "color"; |
| 38 | |
[email protected] | 0209b44 | 2012-07-18 00:38:05 | [diff] [blame] | 39 | // Default to color on or not. |
| 40 | const char kSettingSetColorAsDefault[] = "setColorAsDefault"; |
| 41 | |
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 42 | // Key that specifies the height of the content area of the page. |
| 43 | const char kSettingContentHeight[] = "contentHeight"; |
| 44 | |
| 45 | // Key that specifies the width of the content area of the page. |
| 46 | const char kSettingContentWidth[] = "contentWidth"; |
| 47 | |
[email protected] | c97e5e8 | 2011-04-05 18:50:23 | [diff] [blame] | 48 | // Number of copies. |
| 49 | const char kSettingCopies[] = "copies"; |
| 50 | |
[email protected] | 987e51f9 | 2011-05-04 21:10:15 | [diff] [blame] | 51 | // Device name: Unique printer identifier. |
| 52 | const char kSettingDeviceName[] = "deviceName"; |
| 53 | |
n.bansal | 2604a97 | 2014-12-09 12:26:47 | [diff] [blame] | 54 | // Option to disable scaling. True if scaling is disabled else false. |
| 55 | const char kSettingDisableScaling[] = "disableScaling"; |
| 56 | |
[email protected] | 826e63a16 | 2011-04-20 18:00:45 | [diff] [blame] | 57 | // Print job duplex mode. |
| 58 | const char kSettingDuplexMode[] = "duplex"; |
| 59 | |
[email protected] | 7a3439b | 2012-05-16 20:32:14 | [diff] [blame] | 60 | // Option to fit source page contents to printer paper size: true if |
| 61 | // selected else false. |
| 62 | const char kSettingFitToPageEnabled[] = "fitToPageEnabled"; |
| 63 | |
[email protected] | 576f9964 | 2011-08-31 05:19:41 | [diff] [blame] | 64 | // True, when a new set of draft preview data is required. |
| 65 | const char kSettingGenerateDraftData[] = "generateDraftData"; |
| 66 | |
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 67 | // Option to print headers and Footers: true if selected, false if not. |
| 68 | const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled"; |
| 69 | |
[email protected] | 06bd1866 | 2011-10-07 06:12:40 | [diff] [blame] | 70 | // Interstice or gap between different header footer components. Hardcoded to |
| 71 | // about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea. |
| 72 | const float kSettingHeaderFooterInterstice = 14.2f; |
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 73 | |
| 74 | // Key that specifies the date of the page that will be printed in the headers |
| 75 | // and footers. |
| 76 | const char kSettingHeaderFooterDate[] = "date"; |
| 77 | |
| 78 | // Key that specifies the title of the page that will be printed in the headers |
| 79 | // and footers. |
| 80 | const char kSettingHeaderFooterTitle[] = "title"; |
| 81 | |
| 82 | // Key that specifies the URL of the page that will be printed in the headers |
| 83 | // and footers. |
| 84 | const char kSettingHeaderFooterURL[] = "url"; |
| 85 | |
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 86 | // Page orientation: true for landscape, false for portrait. |
| 87 | const char kSettingLandscape[] = "landscape"; |
| 88 | |
[email protected] | ae98e57 | 2014-05-14 23:52:55 | [diff] [blame] | 89 | // Key that specifies the requested media size. |
| 90 | const char kSettingMediaSize[] = "mediaSize"; |
| 91 | |
| 92 | // Key that specifies the requested media height in microns. |
| 93 | const char kSettingMediaSizeHeightMicrons[] = "height_microns"; |
| 94 | |
| 95 | // Key that specifies the requested media width in microns. |
| 96 | const char kSettingMediaSizeWidthMicrons[] = "width_microns"; |
| 97 | |
[email protected] | 72ddef9 | 2014-06-12 08:08:06 | [diff] [blame] | 98 | // Key that specifies the requested media platform specific vendor id. |
| 99 | const char kSettingMediaSizeVendorId[] = "vendor_id"; |
| 100 | |
alekseys | d6a8369b | 2014-09-24 23:01:31 | [diff] [blame] | 101 | // Key that specifies whether the requested media is a default one. |
| 102 | const char kSettingMediaSizeIsDefault[] = "is_default"; |
| 103 | |
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 104 | // Key that specifies the bottom margin of the page. |
| 105 | const char kSettingMarginBottom[] = "marginBottom"; |
| 106 | |
| 107 | // Key that specifies the left margin of the page. |
| 108 | const char kSettingMarginLeft[] = "marginLeft"; |
| 109 | |
| 110 | // Key that specifies the right margin of the page. |
| 111 | const char kSettingMarginRight[] = "marginRight"; |
| 112 | |
| 113 | // Key that specifies the top margin of the page. |
| 114 | const char kSettingMarginTop[] = "marginTop"; |
| 115 | |
[email protected] | 6a7fdfd | 2011-10-13 09:05:42 | [diff] [blame] | 116 | // Key that specifies the dictionary of custom margins as set by the user. |
| 117 | const char kSettingMarginsCustom[] = "marginsCustom"; |
| 118 | |
| 119 | // Key that specifies the type of margins to use. Value is an int from the |
| 120 | // MarginType enum. |
| 121 | const char kSettingMarginsType[] = "marginsType"; |
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 122 | |
[email protected] | 82b6e0fc | 2013-02-12 01:28:20 | [diff] [blame] | 123 | // Number of pages to print. |
| 124 | const char kSettingPreviewPageCount[] = "pageCount"; |
| 125 | |
[email protected] | 06cb2388 | 2011-04-23 01:58:22 | [diff] [blame] | 126 | // A page range. |
| 127 | const char kSettingPageRange[] = "pageRange"; |
| 128 | |
| 129 | // The first page of a page range. (1-based) |
| 130 | const char kSettingPageRangeFrom[] = "from"; |
| 131 | |
| 132 | // The last page of a page range. (1-based) |
| 133 | const char kSettingPageRangeTo[] = "to"; |
| 134 | |
[email protected] | 3c0bcfa | 2013-11-21 22:47:00 | [diff] [blame] | 135 | // Page size of document to print. |
| 136 | const char kSettingPageWidth[] = "pageWidth"; |
| 137 | const char kSettingPageHeight[] = "pageHeight"; |
| 138 | |
[email protected] | d75a0317e | 2011-10-17 20:20:40 | [diff] [blame] | 139 | const char kSettingPreviewModifiable[] = "previewModifiable"; |
| 140 | |
[email protected] | 0e77a1d | 2012-03-20 03:10:20 | [diff] [blame] | 141 | // Keys that specifies the printable area details. |
| 142 | const char kSettingPrintableAreaX[] = "printableAreaX"; |
| 143 | const char kSettingPrintableAreaY[] = "printableAreaY"; |
| 144 | const char kSettingPrintableAreaWidth[] = "printableAreaWidth"; |
| 145 | const char kSettingPrintableAreaHeight[] = "printableAreaHeight"; |
| 146 | |
[email protected] | f803c93 | 2011-03-30 16:40:12 | [diff] [blame] | 147 | // Printer name. |
| 148 | const char kSettingPrinterName[] = "printerName"; |
| 149 | |
[email protected] | 6df7b5a | 2014-03-29 17:39:47 | [diff] [blame] | 150 | // Printer description. |
| 151 | const char kSettingPrinterDescription[] = "printerDescription"; |
| 152 | |
| 153 | // Additional printer options. |
| 154 | const char kSettingPrinterOptions[] = "printerOptions"; |
| 155 | |
[email protected] | b73bb80b | 2011-04-20 01:58:39 | [diff] [blame] | 156 | // Print to PDF option: true if selected, false if not. |
| 157 | const char kSettingPrintToPDF[] = "printToPDF"; |
| 158 | |
[email protected] | 014a62cb | 2013-11-09 17:23:25 | [diff] [blame] | 159 | // Print using Privet option: true if destination is a Privet printer, false if |
| 160 | // not. |
| 161 | const char kSettingPrintWithPrivet[] = "printWithPrivet"; |
| 162 | |
tbarzic | 90c6d73 | 2015-02-12 03:40:58 | [diff] [blame] | 163 | // Print using extension option: true if destination is an extension printer, |
| 164 | // false if not. |
| 165 | const char kSettingPrintWithExtension[] = "printWithExtension"; |
| 166 | |
[email protected] | 014a62cb | 2013-11-09 17:23:25 | [diff] [blame] | 167 | // Ticket option. Contains the ticket in CJT format. |
| 168 | const char kSettingTicket[] = "ticket"; |
| 169 | |
[email protected] | 19d1c2d | 2013-01-14 00:59:46 | [diff] [blame] | 170 | // Whether to print CSS backgrounds. |
| 171 | const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds"; |
| 172 | |
[email protected] | edb363a8 | 2013-01-29 12:11:29 | [diff] [blame] | 173 | // Whether to print selection only. |
| 174 | const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly"; |
| 175 | |
vitalybuka | 92ab8ce | 2014-08-26 23:41:45 | [diff] [blame] | 176 | // Whether to print selection only. |
| 177 | const char kSettingShowSystemDialog[] = "showSystemDialog"; |
| 178 | |
[email protected] | ff90674 | 2011-08-23 05:04:46 | [diff] [blame] | 179 | // Indices used to represent first preview page and complete preview document. |
[email protected] | fd0b50340 | 2011-07-26 09:01:33 | [diff] [blame] | 180 | const int FIRST_PAGE_INDEX = 0; |
| 181 | const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1; |
[email protected] | fd0b50340 | 2011-07-26 09:01:33 | [diff] [blame] | 182 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 183 | // Whether to show PDF in view provided by OS. Implemented for MacOS only. |
[email protected] | 97c29575 | 2011-11-17 00:44:37 | [diff] [blame] | 184 | const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview"; |
[email protected] | 97c29575 | 2011-11-17 00:44:37 | [diff] [blame] | 185 | |
[email protected] | 63313ae | 2011-10-13 00:40:39 | [diff] [blame] | 186 | #if defined (USE_CUPS) |
| 187 | const char kBlack[] = "Black"; |
| 188 | const char kCMYK[] = "CMYK"; |
| 189 | const char kKCMY[] = "KCMY"; |
| 190 | const char kCMY_K[] = "CMY+K"; |
| 191 | const char kCMY[] = "CMY"; |
| 192 | const char kColor[] = "Color"; |
| 193 | const char kGray[] = "Gray"; |
| 194 | const char kGrayscale[] = "Grayscale"; |
| 195 | const char kGreyscale[] = "Greyscale"; |
| 196 | const char kMonochrome[] = "Monochrome"; |
| 197 | const char kNormal[] = "Normal"; |
| 198 | const char kNormalGray[] = "Normal.Gray"; |
| 199 | const char kRGB[] = "RGB"; |
| 200 | const char kRGBA[] = "RGBA"; |
| 201 | const char kRGB16[] = "RGB16"; |
| 202 | #endif |
| 203 | |
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 204 | } // namespace printing |