OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "printing/print_job_constants.h" | 5 #include "printing/print_job_constants.h" |
6 | 6 |
7 namespace printing { | 7 namespace printing { |
8 | 8 |
9 // Unique ID sent along every preview request. | 9 // Unique ID sent along every preview request. |
10 const char kPreviewRequestID[] = "requestID"; | 10 const char kPreviewRequestID[] = "requestID"; |
11 | 11 |
12 // Print using cloud print: true if selected, false if not. | 12 // Print using cloud print: true if selected, false if not. |
13 const char kSettingCloudPrintId[] = "cloudPrintID"; | 13 const char kSettingCloudPrintId[] = "cloudPrintID"; |
14 | 14 |
15 // Print job setting 'collate'. | 15 // Print job setting 'collate'. |
16 const char kSettingCollate[] = "collate"; | 16 const char kSettingCollate[] = "collate"; |
17 | 17 |
18 // Print out color: true for color, false for grayscale. | 18 // Print out color: true for color, false for grayscale. |
19 const char kSettingColor[] = "color"; | 19 const char kSettingColor[] = "color"; |
20 | 20 |
21 // Number of copies. | 21 // Number of copies. |
22 const char kSettingCopies[] = "copies"; | 22 const char kSettingCopies[] = "copies"; |
23 | 23 |
24 // Device name: Unique printer identifier. | 24 // Device name: Unique printer identifier. |
25 const char kSettingDeviceName[] = "deviceName"; | 25 const char kSettingDeviceName[] = "deviceName"; |
26 | 26 |
27 // Print job duplex mode. | 27 // Print job duplex mode. |
28 const char kSettingDuplexMode[] = "duplex"; | 28 const char kSettingDuplexMode[] = "duplex"; |
29 | 29 |
| 30 // Option to print headers and Footers: true if selected, false if not. |
| 31 const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled"; |
| 32 |
| 33 // Default font name for printing the headers and footers. |
| 34 const char kSettingHeaderFooterFontName[] = "sans"; |
| 35 |
| 36 // Default font size for printing the headers and footers. |
| 37 const int kSettingHeaderFooterFontSize = 8; |
| 38 |
| 39 // Number of horizontal regions for headers and footers. |
| 40 const float kSettingHeaderFooterHorizontalRegions = 3; |
| 41 |
| 42 // Interstice or gap between different header footer components. |
| 43 // Hardcoded to 0.25cm = 1/10" = 7.2points. |
| 44 const float kSettingHeaderFooterInterstice = 7.2f; |
| 45 |
| 46 // Key that specifies the date of the page that will be printed in the headers |
| 47 // and footers. |
| 48 const char kSettingHeaderFooterDate[] = "date"; |
| 49 |
| 50 // Key that specifies the title of the page that will be printed in the headers |
| 51 // and footers. |
| 52 const char kSettingHeaderFooterTitle[] = "title"; |
| 53 |
| 54 // Key that specifies the URL of the page that will be printed in the headers |
| 55 // and footers. |
| 56 const char kSettingHeaderFooterURL[] = "url"; |
| 57 |
30 // Page orientation: true for landscape, false for portrait. | 58 // Page orientation: true for landscape, false for portrait. |
31 const char kSettingLandscape[] = "landscape"; | 59 const char kSettingLandscape[] = "landscape"; |
32 | 60 |
33 // A page range. | 61 // A page range. |
34 const char kSettingPageRange[] = "pageRange"; | 62 const char kSettingPageRange[] = "pageRange"; |
35 | 63 |
36 // The first page of a page range. (1-based) | 64 // The first page of a page range. (1-based) |
37 const char kSettingPageRangeFrom[] = "from"; | 65 const char kSettingPageRangeFrom[] = "from"; |
38 | 66 |
39 // The last page of a page range. (1-based) | 67 // The last page of a page range. (1-based) |
40 const char kSettingPageRangeTo[] = "to"; | 68 const char kSettingPageRangeTo[] = "to"; |
41 | 69 |
42 // Printer name. | 70 // Printer name. |
43 const char kSettingPrinterName[] = "printerName"; | 71 const char kSettingPrinterName[] = "printerName"; |
44 | 72 |
45 // Print to PDF option: true if selected, false if not. | 73 // Print to PDF option: true if selected, false if not. |
46 const char kSettingPrintToPDF[] = "printToPDF"; | 74 const char kSettingPrintToPDF[] = "printToPDF"; |
47 | 75 |
48 // Indices used to represent first page, invalid page and complete | 76 // Indices used to represent first page, invalid page and complete |
49 // preview document. | 77 // preview document. |
50 const int FIRST_PAGE_INDEX = 0; | 78 const int FIRST_PAGE_INDEX = 0; |
51 const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1; | 79 const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1; |
52 const int INVALID_PAGE_INDEX = -2; | 80 const int INVALID_PAGE_INDEX = -2; |
53 | 81 |
54 } // namespace printing | 82 } // namespace printing |
OLD | NEW |