[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] | b579afd | 2011-07-13 00:01:27 | [diff] [blame] | 18 | // Print using cloud print: true if selected, false if not. |
19 | const char kSettingCloudPrintId[] = "cloudPrintID"; | ||||
20 | |||||
[email protected] | f0be15bd | 2011-09-28 20:50:04 | [diff] [blame] | 21 | // Print using cloud print dialog: true if selected, false if not. |
22 | const char kSettingCloudPrintDialog[] = "printWithCloudPrint"; | ||||
23 | |||||
[email protected] | c97e5e8 | 2011-04-05 18:50:23 | [diff] [blame] | 24 | // Print job setting 'collate'. |
25 | const char kSettingCollate[] = "collate"; | ||||
26 | |||||
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 27 | // Print out color: true for color, false for grayscale. |
28 | const char kSettingColor[] = "color"; | ||||
29 | |||||
[email protected] | 0209b44 | 2012-07-18 00:38:05 | [diff] [blame] | 30 | // Default to color on or not. |
31 | const char kSettingSetColorAsDefault[] = "setColorAsDefault"; | ||||
32 | |||||
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 33 | // Key that specifies the height of the content area of the page. |
34 | const char kSettingContentHeight[] = "contentHeight"; | ||||
35 | |||||
36 | // Key that specifies the width of the content area of the page. | ||||
37 | const char kSettingContentWidth[] = "contentWidth"; | ||||
38 | |||||
[email protected] | c97e5e8 | 2011-04-05 18:50:23 | [diff] [blame] | 39 | // Number of copies. |
40 | const char kSettingCopies[] = "copies"; | ||||
41 | |||||
[email protected] | 987e51f9 | 2011-05-04 21:10:15 | [diff] [blame] | 42 | // Device name: Unique printer identifier. |
43 | const char kSettingDeviceName[] = "deviceName"; | ||||
44 | |||||
[email protected] | 826e63a16 | 2011-04-20 18:00:45 | [diff] [blame] | 45 | // Print job duplex mode. |
46 | const char kSettingDuplexMode[] = "duplex"; | ||||
47 | |||||
[email protected] | 7a3439b | 2012-05-16 20:32:14 | [diff] [blame] | 48 | // Option to fit source page contents to printer paper size: true if |
49 | // selected else false. | ||||
50 | const char kSettingFitToPageEnabled[] = "fitToPageEnabled"; | ||||
51 | |||||
[email protected] | 576f9964 | 2011-08-31 05:19:41 | [diff] [blame] | 52 | // True, when a new set of draft preview data is required. |
53 | const char kSettingGenerateDraftData[] = "generateDraftData"; | ||||
54 | |||||
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 55 | // Option to print headers and Footers: true if selected, false if not. |
56 | const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled"; | ||||
57 | |||||
[email protected] | 06bd1866 | 2011-10-07 06:12:40 | [diff] [blame] | 58 | // Interstice or gap between different header footer components. Hardcoded to |
59 | // about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea. | ||||
60 | const float kSettingHeaderFooterInterstice = 14.2f; | ||||
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 61 | |
62 | // Key that specifies the date of the page that will be printed in the headers | ||||
63 | // and footers. | ||||
64 | const char kSettingHeaderFooterDate[] = "date"; | ||||
65 | |||||
66 | // Key that specifies the title of the page that will be printed in the headers | ||||
67 | // and footers. | ||||
68 | const char kSettingHeaderFooterTitle[] = "title"; | ||||
69 | |||||
70 | // Key that specifies the URL of the page that will be printed in the headers | ||||
71 | // and footers. | ||||
72 | const char kSettingHeaderFooterURL[] = "url"; | ||||
73 | |||||
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 74 | // Page orientation: true for landscape, false for portrait. |
75 | const char kSettingLandscape[] = "landscape"; | ||||
76 | |||||
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 77 | // Key that specifies the bottom margin of the page. |
78 | const char kSettingMarginBottom[] = "marginBottom"; | ||||
79 | |||||
80 | // Key that specifies the left margin of the page. | ||||
81 | const char kSettingMarginLeft[] = "marginLeft"; | ||||
82 | |||||
83 | // Key that specifies the right margin of the page. | ||||
84 | const char kSettingMarginRight[] = "marginRight"; | ||||
85 | |||||
86 | // Key that specifies the top margin of the page. | ||||
87 | const char kSettingMarginTop[] = "marginTop"; | ||||
88 | |||||
[email protected] | 6a7fdfd | 2011-10-13 09:05:42 | [diff] [blame] | 89 | // Key that specifies the dictionary of custom margins as set by the user. |
90 | const char kSettingMarginsCustom[] = "marginsCustom"; | ||||
91 | |||||
92 | // Key that specifies the type of margins to use. Value is an int from the | ||||
93 | // MarginType enum. | ||||
94 | const char kSettingMarginsType[] = "marginsType"; | ||||
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 95 | |
[email protected] | 06cb2388 | 2011-04-23 01:58:22 | [diff] [blame] | 96 | // A page range. |
97 | const char kSettingPageRange[] = "pageRange"; | ||||
98 | |||||
99 | // The first page of a page range. (1-based) | ||||
100 | const char kSettingPageRangeFrom[] = "from"; | ||||
101 | |||||
102 | // The last page of a page range. (1-based) | ||||
103 | const char kSettingPageRangeTo[] = "to"; | ||||
104 | |||||
[email protected] | d75a0317e | 2011-10-17 20:20:40 | [diff] [blame] | 105 | const char kSettingPreviewModifiable[] = "previewModifiable"; |
106 | |||||
[email protected] | 0e77a1d | 2012-03-20 03:10:20 | [diff] [blame] | 107 | // Keys that specifies the printable area details. |
108 | const char kSettingPrintableAreaX[] = "printableAreaX"; | ||||
109 | const char kSettingPrintableAreaY[] = "printableAreaY"; | ||||
110 | const char kSettingPrintableAreaWidth[] = "printableAreaWidth"; | ||||
111 | const char kSettingPrintableAreaHeight[] = "printableAreaHeight"; | ||||
112 | |||||
[email protected] | f803c93 | 2011-03-30 16:40:12 | [diff] [blame] | 113 | // Printer name. |
114 | const char kSettingPrinterName[] = "printerName"; | ||||
115 | |||||
[email protected] | b73bb80b | 2011-04-20 01:58:39 | [diff] [blame] | 116 | // Print to PDF option: true if selected, false if not. |
117 | const char kSettingPrintToPDF[] = "printToPDF"; | ||||
118 | |||||
[email protected] | 19d1c2d | 2013-01-14 00:59:46 | [diff] [blame] | 119 | // Whether to print CSS backgrounds. |
120 | const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds"; | ||||
121 | |||||
[email protected] | edb363a8 | 2013-01-29 12:11:29 | [diff] [blame^] | 122 | // Whether to print selection only. |
123 | const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly"; | ||||
124 | |||||
[email protected] | ff90674 | 2011-08-23 05:04:46 | [diff] [blame] | 125 | // Indices used to represent first preview page and complete preview document. |
[email protected] | fd0b50340 | 2011-07-26 09:01:33 | [diff] [blame] | 126 | const int FIRST_PAGE_INDEX = 0; |
127 | const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1; | ||||
[email protected] | fd0b50340 | 2011-07-26 09:01:33 | [diff] [blame] | 128 | |
[email protected] | 97c29575 | 2011-11-17 00:44:37 | [diff] [blame] | 129 | #if defined(OS_MACOSX) |
130 | const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview"; | ||||
131 | #endif | ||||
132 | |||||
[email protected] | 63313ae | 2011-10-13 00:40:39 | [diff] [blame] | 133 | #if defined (USE_CUPS) |
134 | const char kBlack[] = "Black"; | ||||
135 | const char kCMYK[] = "CMYK"; | ||||
136 | const char kKCMY[] = "KCMY"; | ||||
137 | const char kCMY_K[] = "CMY+K"; | ||||
138 | const char kCMY[] = "CMY"; | ||||
139 | const char kColor[] = "Color"; | ||||
140 | const char kGray[] = "Gray"; | ||||
141 | const char kGrayscale[] = "Grayscale"; | ||||
142 | const char kGreyscale[] = "Greyscale"; | ||||
143 | const char kMonochrome[] = "Monochrome"; | ||||
144 | const char kNormal[] = "Normal"; | ||||
145 | const char kNormalGray[] = "Normal.Gray"; | ||||
146 | const char kRGB[] = "RGB"; | ||||
147 | const char kRGBA[] = "RGBA"; | ||||
148 | const char kRGB16[] = "RGB16"; | ||||
149 | #endif | ||||
150 | |||||
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 151 | } // namespace printing |