OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef PRINTING_BACKEND_PRINT_BACKEND_H_ | 5 #ifndef PRINTING_BACKEND_PRINT_BACKEND_H_ |
6 #define PRINTING_BACKEND_PRINT_BACKEND_H_ | 6 #define PRINTING_BACKEND_PRINT_BACKEND_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "printing/print_job_constants.h" | 13 #include "printing/print_job_constants.h" |
14 #include "printing/printing_export.h" | 14 #include "printing/printing_export.h" |
| 15 #include "ui/gfx/geometry/size.h" |
15 | 16 |
16 namespace base { | 17 namespace base { |
17 class DictionaryValue; | 18 class DictionaryValue; |
18 } | 19 } |
19 | 20 |
20 // This is the interface for platform-specific code for a print backend | 21 // This is the interface for platform-specific code for a print backend |
21 namespace printing { | 22 namespace printing { |
22 | 23 |
23 struct PRINTING_EXPORT PrinterBasicInfo { | 24 struct PRINTING_EXPORT PrinterBasicInfo { |
24 PrinterBasicInfo(); | 25 PrinterBasicInfo(); |
25 ~PrinterBasicInfo(); | 26 ~PrinterBasicInfo(); |
26 | 27 |
27 std::string printer_name; | 28 std::string printer_name; |
28 std::string printer_description; | 29 std::string printer_description; |
29 int printer_status; | 30 int printer_status; |
30 int is_default; | 31 int is_default; |
31 std::map<std::string, std::string> options; | 32 std::map<std::string, std::string> options; |
32 }; | 33 }; |
33 | 34 |
34 typedef std::vector<PrinterBasicInfo> PrinterList; | 35 typedef std::vector<PrinterBasicInfo> PrinterList; |
35 | 36 |
36 struct PRINTING_EXPORT PrinterSemanticCapsAndDefaults { | 37 struct PRINTING_EXPORT PrinterSemanticCapsAndDefaults { |
37 PrinterSemanticCapsAndDefaults(); | 38 PrinterSemanticCapsAndDefaults(); |
38 ~PrinterSemanticCapsAndDefaults(); | 39 ~PrinterSemanticCapsAndDefaults(); |
39 | 40 |
40 // Capabilities. | |
41 bool color_changeable; | 41 bool color_changeable; |
42 bool duplex_capable; | 42 bool color_default; |
43 | 43 |
44 #if defined(USE_CUPS) | 44 #if defined(USE_CUPS) |
45 ColorModel color_model; | 45 ColorModel color_model; |
46 ColorModel bw_model; | 46 ColorModel bw_model; |
47 #endif | 47 #endif |
48 | 48 |
49 // Current defaults. | 49 #if defined(OS_WIN) |
50 bool color_default; | 50 bool collate_capable; |
| 51 bool collate_default; |
| 52 |
| 53 bool copies_capable; |
| 54 |
| 55 struct Paper { |
| 56 std::string name; |
| 57 gfx::Size size_um; |
| 58 }; |
| 59 |
| 60 std::vector<Paper> papers; |
| 61 Paper default_paper; |
| 62 |
| 63 std::vector<gfx::Size> dpis; |
| 64 gfx::Size default_dpi; |
| 65 #endif |
| 66 |
| 67 bool duplex_capable; |
51 DuplexMode duplex_default; | 68 DuplexMode duplex_default; |
52 }; | 69 }; |
53 | 70 |
54 struct PRINTING_EXPORT PrinterCapsAndDefaults { | 71 struct PRINTING_EXPORT PrinterCapsAndDefaults { |
55 PrinterCapsAndDefaults(); | 72 PrinterCapsAndDefaults(); |
56 ~PrinterCapsAndDefaults(); | 73 ~PrinterCapsAndDefaults(); |
57 | 74 |
58 std::string printer_capabilities; | 75 std::string printer_capabilities; |
59 std::string caps_mime_type; | 76 std::string caps_mime_type; |
60 std::string printer_defaults; | 77 std::string printer_defaults; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 const base::DictionaryValue* print_backend_settings); | 121 const base::DictionaryValue* print_backend_settings); |
105 | 122 |
106 protected: | 123 protected: |
107 friend class base::RefCountedThreadSafe<PrintBackend>; | 124 friend class base::RefCountedThreadSafe<PrintBackend>; |
108 virtual ~PrintBackend(); | 125 virtual ~PrintBackend(); |
109 }; | 126 }; |
110 | 127 |
111 } // namespace printing | 128 } // namespace printing |
112 | 129 |
113 #endif // PRINTING_BACKEND_PRINT_BACKEND_H_ | 130 #endif // PRINTING_BACKEND_PRINT_BACKEND_H_ |
OLD | NEW |