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 #ifndef PRINTING_PRINTING_CONTEXT_MAC_H_ | 5 #ifndef PRINTING_PRINTING_CONTEXT_MAC_H_ |
6 #define PRINTING_PRINTING_CONTEXT_MAC_H_ | 6 #define PRINTING_PRINTING_CONTEXT_MAC_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/memory/scoped_nsobject.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 PageRanges GetPageRangesFromPrintInfo(); | 54 PageRanges GetPageRangesFromPrintInfo(); |
55 | 55 |
56 // Updates |print_info_| to use the given printer. | 56 // Updates |print_info_| to use the given printer. |
57 // Returns true if the printer was set else returns false. | 57 // Returns true if the printer was set else returns false. |
58 bool SetPrinter(const std::string& device_name); | 58 bool SetPrinter(const std::string& device_name); |
59 | 59 |
60 // Updates |print_info_| page format with user default paper information. | 60 // Updates |print_info_| page format with user default paper information. |
61 // Returns true if the paper was set else returns false. | 61 // Returns true if the paper was set else returns false. |
62 bool UpdatePageFormatWithPaperInfo(); | 62 bool UpdatePageFormatWithPaperInfo(); |
63 | 63 |
| 64 // Sets the print job destination type as preview job. |
| 65 // Returns true if the print job destination type is set. |
| 66 bool SetPrintPreviewJob(); |
| 67 |
64 // Sets |copies| in PMPrintSettings. | 68 // Sets |copies| in PMPrintSettings. |
65 // Returns true if the number of copies is set. | 69 // Returns true if the number of copies is set. |
66 bool SetCopiesInPrintSettings(int copies); | 70 bool SetCopiesInPrintSettings(int copies); |
67 | 71 |
68 // Sets |collate| in PMPrintSettings. | 72 // Sets |collate| in PMPrintSettings. |
69 // Returns true if |collate| is set. | 73 // Returns true if |collate| is set. |
70 bool SetCollateInPrintSettings(bool collate); | 74 bool SetCollateInPrintSettings(bool collate); |
71 | 75 |
72 // Sets orientation in native print info object. | 76 // Sets orientation in native print info object. |
73 // Returns true if the orientation was set. | 77 // Returns true if the orientation was set. |
(...skipping 13 matching lines...) Expand all Loading... |
87 // The current page's context; only valid between NewPage and PageDone call | 91 // The current page's context; only valid between NewPage and PageDone call |
88 // pairs. | 92 // pairs. |
89 CGContext* context_; | 93 CGContext* context_; |
90 | 94 |
91 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac); | 95 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac); |
92 }; | 96 }; |
93 | 97 |
94 } // namespace printing | 98 } // namespace printing |
95 | 99 |
96 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_ | 100 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_ |
OLD | NEW |