[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. |
16 | const char kPreviewUIAddr[] = "previewUIAddr"; | ||||
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] | 151b4f24 | 2011-08-19 20:21:28 | [diff] [blame] | 58 | // Default character spacing for text while printing headers and footers. |
59 | // (For CoreGraphics only). | ||||
60 | const int kSettingHeaderFooterCharacterSpacing = 0; | ||||
61 | |||||
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 62 | // Default font family name for printing the headers and footers. |
63 | const char kSettingHeaderFooterFontFamilyName[] = "sans"; | ||||
64 | |||||
65 | // Default font name for printing the headers and footers. | ||||
66 | const char kSettingHeaderFooterFontName[] = "Helvetica"; | ||||
67 | |||||
68 | // Default font size for printing the headers and footers. | ||||
69 | const int kSettingHeaderFooterFontSize = 8; | ||||
70 | |||||
71 | // Number of horizontal regions for headers and footers. | ||||
72 | const float kSettingHeaderFooterHorizontalRegions = 3; | ||||
73 | |||||
[email protected] | 06bd1866 | 2011-10-07 06:12:40 | [diff] [blame] | 74 | // Interstice or gap between different header footer components. Hardcoded to |
75 | // about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea. | ||||
76 | const float kSettingHeaderFooterInterstice = 14.2f; | ||||
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 77 | |
78 | // Key that specifies the date of the page that will be printed in the headers | ||||
79 | // and footers. | ||||
80 | const char kSettingHeaderFooterDate[] = "date"; | ||||
81 | |||||
82 | // Key that specifies the title of the page that will be printed in the headers | ||||
83 | // and footers. | ||||
84 | const char kSettingHeaderFooterTitle[] = "title"; | ||||
85 | |||||
86 | // Key that specifies the URL of the page that will be printed in the headers | ||||
87 | // and footers. | ||||
88 | const char kSettingHeaderFooterURL[] = "url"; | ||||
89 | |||||
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 90 | // Page orientation: true for landscape, false for portrait. |
91 | const char kSettingLandscape[] = "landscape"; | ||||
92 | |||||
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 93 | // Key that specifies the bottom margin of the page. |
94 | const char kSettingMarginBottom[] = "marginBottom"; | ||||
95 | |||||
96 | // Key that specifies the left margin of the page. | ||||
97 | const char kSettingMarginLeft[] = "marginLeft"; | ||||
98 | |||||
99 | // Key that specifies the right margin of the page. | ||||
100 | const char kSettingMarginRight[] = "marginRight"; | ||||
101 | |||||
102 | // Key that specifies the top margin of the page. | ||||
103 | const char kSettingMarginTop[] = "marginTop"; | ||||
104 | |||||
[email protected] | 6a7fdfd | 2011-10-13 09:05:42 | [diff] [blame] | 105 | // Key that specifies the dictionary of custom margins as set by the user. |
106 | const char kSettingMarginsCustom[] = "marginsCustom"; | ||||
107 | |||||
108 | // Key that specifies the type of margins to use. Value is an int from the | ||||
109 | // MarginType enum. | ||||
110 | const char kSettingMarginsType[] = "marginsType"; | ||||
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 111 | |
[email protected] | 06cb2388 | 2011-04-23 01:58:22 | [diff] [blame] | 112 | // A page range. |
113 | const char kSettingPageRange[] = "pageRange"; | ||||
114 | |||||
115 | // The first page of a page range. (1-based) | ||||
116 | const char kSettingPageRangeFrom[] = "from"; | ||||
117 | |||||
118 | // The last page of a page range. (1-based) | ||||
119 | const char kSettingPageRangeTo[] = "to"; | ||||
120 | |||||
[email protected] | d75a0317e | 2011-10-17 20:20:40 | [diff] [blame] | 121 | const char kSettingPreviewModifiable[] = "previewModifiable"; |
122 | |||||
[email protected] | 0e77a1d | 2012-03-20 03:10:20 | [diff] [blame] | 123 | // Keys that specifies the printable area details. |
124 | const char kSettingPrintableAreaX[] = "printableAreaX"; | ||||
125 | const char kSettingPrintableAreaY[] = "printableAreaY"; | ||||
126 | const char kSettingPrintableAreaWidth[] = "printableAreaWidth"; | ||||
127 | const char kSettingPrintableAreaHeight[] = "printableAreaHeight"; | ||||
128 | |||||
[email protected] | f803c93 | 2011-03-30 16:40:12 | [diff] [blame] | 129 | // Printer name. |
130 | const char kSettingPrinterName[] = "printerName"; | ||||
131 | |||||
[email protected] | b73bb80b | 2011-04-20 01:58:39 | [diff] [blame] | 132 | // Print to PDF option: true if selected, false if not. |
133 | const char kSettingPrintToPDF[] = "printToPDF"; | ||||
134 | |||||
[email protected] | ff90674 | 2011-08-23 05:04:46 | [diff] [blame] | 135 | // Indices used to represent first preview page and complete preview document. |
[email protected] | fd0b50340 | 2011-07-26 09:01:33 | [diff] [blame] | 136 | const int FIRST_PAGE_INDEX = 0; |
137 | const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1; | ||||
[email protected] | fd0b50340 | 2011-07-26 09:01:33 | [diff] [blame] | 138 | |
[email protected] | 97c29575 | 2011-11-17 00:44:37 | [diff] [blame] | 139 | #if defined(OS_MACOSX) |
140 | const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview"; | ||||
141 | #endif | ||||
142 | |||||
[email protected] | 63313ae | 2011-10-13 00:40:39 | [diff] [blame] | 143 | #if defined (USE_CUPS) |
144 | const char kBlack[] = "Black"; | ||||
145 | const char kCMYK[] = "CMYK"; | ||||
146 | const char kKCMY[] = "KCMY"; | ||||
147 | const char kCMY_K[] = "CMY+K"; | ||||
148 | const char kCMY[] = "CMY"; | ||||
149 | const char kColor[] = "Color"; | ||||
150 | const char kGray[] = "Gray"; | ||||
151 | const char kGrayscale[] = "Grayscale"; | ||||
152 | const char kGreyscale[] = "Greyscale"; | ||||
153 | const char kMonochrome[] = "Monochrome"; | ||||
154 | const char kNormal[] = "Normal"; | ||||
155 | const char kNormalGray[] = "Normal.Gray"; | ||||
156 | const char kRGB[] = "RGB"; | ||||
157 | const char kRGBA[] = "RGBA"; | ||||
158 | const char kRGB16[] = "RGB16"; | ||||
159 | #endif | ||||
160 | |||||
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 161 | } // namespace printing |