[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 1 | // Copyright (c) 2011 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. |
| 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] | c97e5e8 | 2011-04-05 18:50:23 | [diff] [blame] | 21 | // Print job setting 'collate'. |
| 22 | const char kSettingCollate[] = "collate"; |
| 23 | |
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 24 | // Print out color: true for color, false for grayscale. |
| 25 | const char kSettingColor[] = "color"; |
| 26 | |
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 27 | // Key that specifies the height of the content area of the page. |
| 28 | const char kSettingContentHeight[] = "contentHeight"; |
| 29 | |
| 30 | // Key that specifies the width of the content area of the page. |
| 31 | const char kSettingContentWidth[] = "contentWidth"; |
| 32 | |
[email protected] | c97e5e8 | 2011-04-05 18:50:23 | [diff] [blame] | 33 | // Number of copies. |
| 34 | const char kSettingCopies[] = "copies"; |
| 35 | |
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 36 | // Key that specifies if the default margins have been selected or not. |
| 37 | // True if selected, false if not. |
| 38 | const char kSettingDefaultMarginsSelected[] = "defaultMarginsSelected"; |
| 39 | |
[email protected] | 987e51f9 | 2011-05-04 21:10:15 | [diff] [blame] | 40 | // Device name: Unique printer identifier. |
| 41 | const char kSettingDeviceName[] = "deviceName"; |
| 42 | |
[email protected] | 826e63a16 | 2011-04-20 18:00:45 | [diff] [blame] | 43 | // Print job duplex mode. |
| 44 | const char kSettingDuplexMode[] = "duplex"; |
| 45 | |
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 46 | // Option to print headers and Footers: true if selected, false if not. |
| 47 | const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled"; |
| 48 | |
[email protected] | 151b4f24 | 2011-08-19 20:21:28 | [diff] [blame] | 49 | // Default character spacing for text while printing headers and footers. |
| 50 | // (For CoreGraphics only). |
| 51 | const int kSettingHeaderFooterCharacterSpacing = 0; |
| 52 | |
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 53 | // Default font family name for printing the headers and footers. |
| 54 | const char kSettingHeaderFooterFontFamilyName[] = "sans"; |
| 55 | |
| 56 | // Default font name for printing the headers and footers. |
| 57 | const char kSettingHeaderFooterFontName[] = "Helvetica"; |
| 58 | |
| 59 | // Default font size for printing the headers and footers. |
| 60 | const int kSettingHeaderFooterFontSize = 8; |
| 61 | |
| 62 | // Number of horizontal regions for headers and footers. |
| 63 | const float kSettingHeaderFooterHorizontalRegions = 3; |
| 64 | |
| 65 | // Interstice or gap between different header footer components. |
| 66 | // Hardcoded to 0.25cm = 1/10" = 7.2points. |
| 67 | const float kSettingHeaderFooterInterstice = 7.2f; |
| 68 | |
| 69 | // Key that specifies the date of the page that will be printed in the headers |
| 70 | // and footers. |
| 71 | const char kSettingHeaderFooterDate[] = "date"; |
| 72 | |
| 73 | // Key that specifies the title of the page that will be printed in the headers |
| 74 | // and footers. |
| 75 | const char kSettingHeaderFooterTitle[] = "title"; |
| 76 | |
| 77 | // Key that specifies the URL of the page that will be printed in the headers |
| 78 | // and footers. |
| 79 | const char kSettingHeaderFooterURL[] = "url"; |
| 80 | |
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 81 | // Page orientation: true for landscape, false for portrait. |
| 82 | const char kSettingLandscape[] = "landscape"; |
| 83 | |
[email protected] | 7a9b03e3 | 2011-08-23 19:56:18 | [diff] [blame] | 84 | // Key that specifies the bottom margin of the page. |
| 85 | const char kSettingMarginBottom[] = "marginBottom"; |
| 86 | |
| 87 | // Key that specifies the left margin of the page. |
| 88 | const char kSettingMarginLeft[] = "marginLeft"; |
| 89 | |
| 90 | // Key that specifies the right margin of the page. |
| 91 | const char kSettingMarginRight[] = "marginRight"; |
| 92 | |
| 93 | // Key that specifies the top margin of the page. |
| 94 | const char kSettingMarginTop[] = "marginTop"; |
| 95 | |
| 96 | // Key that specifies the array of custom margins as set by the user. |
| 97 | const char kSettingMargins[] = "margins"; |
| 98 | |
[email protected] | 06cb2388 | 2011-04-23 01:58:22 | [diff] [blame] | 99 | // A page range. |
| 100 | const char kSettingPageRange[] = "pageRange"; |
| 101 | |
| 102 | // The first page of a page range. (1-based) |
| 103 | const char kSettingPageRangeFrom[] = "from"; |
| 104 | |
| 105 | // The last page of a page range. (1-based) |
| 106 | const char kSettingPageRangeTo[] = "to"; |
| 107 | |
[email protected] | f803c93 | 2011-03-30 16:40:12 | [diff] [blame] | 108 | // Printer name. |
| 109 | const char kSettingPrinterName[] = "printerName"; |
| 110 | |
[email protected] | b73bb80b | 2011-04-20 01:58:39 | [diff] [blame] | 111 | // Print to PDF option: true if selected, false if not. |
| 112 | const char kSettingPrintToPDF[] = "printToPDF"; |
| 113 | |
[email protected] | ff90674 | 2011-08-23 05:04:46 | [diff] [blame] | 114 | // Indices used to represent first preview page and complete preview document. |
[email protected] | fd0b50340 | 2011-07-26 09:01:33 | [diff] [blame] | 115 | const int FIRST_PAGE_INDEX = 0; |
| 116 | const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1; |
[email protected] | fd0b50340 | 2011-07-26 09:01:33 | [diff] [blame] | 117 | |
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 118 | } // namespace printing |