Limit App Host installation / usage for platform apps to Google Chome only.
[chromium-blink-merge.git] / printing / print_job_constants.cc
blob8cd6208eb642b7592c8125c93d12fb1e6c9a5692
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 to identify a print preview UI.
16 const char kPreviewUIID[] = "previewUIID";
18 // Print using cloud print: true if selected, false if not.
19 const char kSettingCloudPrintId[] = "cloudPrintID";
21 // Print using cloud print dialog: true if selected, false if not.
22 const char kSettingCloudPrintDialog[] = "printWithCloudPrint";
24 // Print job setting 'collate'.
25 const char kSettingCollate[] = "collate";
27 // Print out color: true for color, false for grayscale.
28 const char kSettingColor[] = "color";
30 // Default to color on or not.
31 const char kSettingSetColorAsDefault[] = "setColorAsDefault";
33 // Key that specifies the height of the content area of the page.
34 const char kSettingContentHeight[] = "contentHeight";
36 // Key that specifies the width of the content area of the page.
37 const char kSettingContentWidth[] = "contentWidth";
39 // Number of copies.
40 const char kSettingCopies[] = "copies";
42 // Device name: Unique printer identifier.
43 const char kSettingDeviceName[] = "deviceName";
45 // Print job duplex mode.
46 const char kSettingDuplexMode[] = "duplex";
48 // Option to fit source page contents to printer paper size: true if
49 // selected else false.
50 const char kSettingFitToPageEnabled[] = "fitToPageEnabled";
52 // True, when a new set of draft preview data is required.
53 const char kSettingGenerateDraftData[] = "generateDraftData";
55 // Option to print headers and Footers: true if selected, false if not.
56 const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
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;
62 // Key that specifies the date of the page that will be printed in the headers
63 // and footers.
64 const char kSettingHeaderFooterDate[] = "date";
66 // Key that specifies the title of the page that will be printed in the headers
67 // and footers.
68 const char kSettingHeaderFooterTitle[] = "title";
70 // Key that specifies the URL of the page that will be printed in the headers
71 // and footers.
72 const char kSettingHeaderFooterURL[] = "url";
74 // Page orientation: true for landscape, false for portrait.
75 const char kSettingLandscape[] = "landscape";
77 // Key that specifies the bottom margin of the page.
78 const char kSettingMarginBottom[] = "marginBottom";
80 // Key that specifies the left margin of the page.
81 const char kSettingMarginLeft[] = "marginLeft";
83 // Key that specifies the right margin of the page.
84 const char kSettingMarginRight[] = "marginRight";
86 // Key that specifies the top margin of the page.
87 const char kSettingMarginTop[] = "marginTop";
89 // Key that specifies the dictionary of custom margins as set by the user.
90 const char kSettingMarginsCustom[] = "marginsCustom";
92 // Key that specifies the type of margins to use. Value is an int from the
93 // MarginType enum.
94 const char kSettingMarginsType[] = "marginsType";
96 // A page range.
97 const char kSettingPageRange[] = "pageRange";
99 // The first page of a page range. (1-based)
100 const char kSettingPageRangeFrom[] = "from";
102 // The last page of a page range. (1-based)
103 const char kSettingPageRangeTo[] = "to";
105 const char kSettingPreviewModifiable[] = "previewModifiable";
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";
113 // Printer name.
114 const char kSettingPrinterName[] = "printerName";
116 // Print to PDF option: true if selected, false if not.
117 const char kSettingPrintToPDF[] = "printToPDF";
119 // Indices used to represent first preview page and complete preview document.
120 const int FIRST_PAGE_INDEX = 0;
121 const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
123 #if defined(OS_MACOSX)
124 const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview";
125 #endif
127 #if defined (USE_CUPS)
128 const char kBlack[] = "Black";
129 const char kCMYK[] = "CMYK";
130 const char kKCMY[] = "KCMY";
131 const char kCMY_K[] = "CMY+K";
132 const char kCMY[] = "CMY";
133 const char kColor[] = "Color";
134 const char kGray[] = "Gray";
135 const char kGrayscale[] = "Grayscale";
136 const char kGreyscale[] = "Greyscale";
137 const char kMonochrome[] = "Monochrome";
138 const char kNormal[] = "Normal";
139 const char kNormalGray[] = "Normal.Gray";
140 const char kRGB[] = "RGB";
141 const char kRGBA[] = "RGBA";
142 const char kRGB16[] = "RGB16";
143 #endif
145 } // namespace printing