OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Singly or multiply-included shared traits file depending on circumstances. | |
6 // This allows the use of printing IPC serialization macros in more than one IPC | |
7 // message file. | |
8 #ifndef COMPONENTS_PRINTING_COMMON_PRINTING_PARAM_TRAITS_MACROS_H_ | 5 #ifndef COMPONENTS_PRINTING_COMMON_PRINTING_PARAM_TRAITS_MACROS_H_ |
9 #define COMPONENTS_PRINTING_COMMON_PRINTING_PARAM_TRAITS_MACROS_H_ | 6 #define COMPONENTS_PRINTING_COMMON_PRINTING_PARAM_TRAITS_MACROS_H_ |
10 | 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/strings/string16.h" |
| 12 #include "build/build_config.h" |
11 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
| 14 #include "printing/backend/print_backend.h" |
| 15 #include "printing/features/features.h" |
| 16 #include "printing/page_range.h" |
| 17 #include "printing/pdf_render_settings.h" |
12 #include "printing/print_job_constants.h" | 18 #include "printing/print_job_constants.h" |
| 19 #include "printing/pwg_raster_settings.h" |
13 | 20 |
14 // TODO(dgn) move all those macros back to | 21 #if defined(OS_WIN) |
15 // components/printing/common/print_messages.h when they can be handled by a | 22 #include <windows.h> |
16 // single generator. (main tracking bug: crbug.com/450822) | 23 #endif |
| 24 |
17 IPC_ENUM_TRAITS_MAX_VALUE(printing::MarginType, | 25 IPC_ENUM_TRAITS_MAX_VALUE(printing::MarginType, |
18 printing::MARGIN_TYPE_LAST) | 26 printing::MARGIN_TYPE_LAST) |
| 27 |
19 IPC_ENUM_TRAITS_MIN_MAX_VALUE(printing::DuplexMode, | 28 IPC_ENUM_TRAITS_MIN_MAX_VALUE(printing::DuplexMode, |
20 printing::UNKNOWN_DUPLEX_MODE, | 29 printing::UNKNOWN_DUPLEX_MODE, |
21 printing::SHORT_EDGE) | 30 printing::SHORT_EDGE) |
22 | 31 |
| 32 IPC_STRUCT_TRAITS_BEGIN(printing::PrinterCapsAndDefaults) |
| 33 IPC_STRUCT_TRAITS_MEMBER(printer_capabilities) |
| 34 IPC_STRUCT_TRAITS_MEMBER(caps_mime_type) |
| 35 IPC_STRUCT_TRAITS_MEMBER(printer_defaults) |
| 36 IPC_STRUCT_TRAITS_MEMBER(defaults_mime_type) |
| 37 IPC_STRUCT_TRAITS_END() |
| 38 |
| 39 IPC_ENUM_TRAITS_MAX_VALUE(printing::ColorModel, printing::PROCESSCOLORMODEL_RGB) |
| 40 |
| 41 IPC_STRUCT_TRAITS_BEGIN(printing::PrinterSemanticCapsAndDefaults::Paper) |
| 42 IPC_STRUCT_TRAITS_MEMBER(display_name) |
| 43 IPC_STRUCT_TRAITS_MEMBER(vendor_id) |
| 44 IPC_STRUCT_TRAITS_MEMBER(size_um) |
| 45 IPC_STRUCT_TRAITS_END() |
| 46 |
| 47 IPC_STRUCT_TRAITS_BEGIN(printing::PrinterSemanticCapsAndDefaults) |
| 48 IPC_STRUCT_TRAITS_MEMBER(collate_capable) |
| 49 IPC_STRUCT_TRAITS_MEMBER(collate_default) |
| 50 IPC_STRUCT_TRAITS_MEMBER(copies_capable) |
| 51 IPC_STRUCT_TRAITS_MEMBER(duplex_capable) |
| 52 IPC_STRUCT_TRAITS_MEMBER(duplex_default) |
| 53 IPC_STRUCT_TRAITS_MEMBER(color_changeable) |
| 54 IPC_STRUCT_TRAITS_MEMBER(color_default) |
| 55 IPC_STRUCT_TRAITS_MEMBER(color_model) |
| 56 IPC_STRUCT_TRAITS_MEMBER(bw_model) |
| 57 IPC_STRUCT_TRAITS_MEMBER(papers) |
| 58 IPC_STRUCT_TRAITS_MEMBER(default_paper) |
| 59 IPC_STRUCT_TRAITS_MEMBER(dpis) |
| 60 IPC_STRUCT_TRAITS_MEMBER(default_dpi) |
| 61 IPC_STRUCT_TRAITS_END() |
| 62 |
| 63 IPC_ENUM_TRAITS_MAX_VALUE(printing::PwgRasterTransformType, |
| 64 printing::TRANSFORM_TYPE_LAST) |
| 65 |
| 66 IPC_STRUCT_TRAITS_BEGIN(printing::PwgRasterSettings) |
| 67 IPC_STRUCT_TRAITS_MEMBER(odd_page_transform) |
| 68 IPC_STRUCT_TRAITS_MEMBER(rotate_all_pages) |
| 69 IPC_STRUCT_TRAITS_MEMBER(reverse_page_order) |
| 70 IPC_STRUCT_TRAITS_END() |
| 71 |
23 #endif // COMPONENTS_PRINTING_COMMON_PRINTING_PARAM_TRAITS_MACROS_H_ | 72 #endif // COMPONENTS_PRINTING_COMMON_PRINTING_PARAM_TRAITS_MACROS_H_ |
OLD | NEW |