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/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 // info object and use |settings_.ranges| instead. | 50 // info object and use |settings_.ranges| instead. |
51 void InitPrintSettingsFromPrintInfo(); | 51 void InitPrintSettingsFromPrintInfo(); |
52 | 52 |
53 // Returns the set of page ranges constructed from |print_info_|. | 53 // Returns the set of page ranges constructed from |print_info_|. |
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 paper selected by user. If paper was |
61 // not selected, default system paper is used. | |
61 // Returns true if the paper was set else returns false. | 62 // Returns true if the paper was set else returns false. |
62 bool UpdatePageFormatWithPaperInfo(); | 63 bool UpdatePageFormatWithPaperInfo(); |
63 | 64 |
65 // Updates |print_info_| page format with |paper|. | |
66 // Returns true if the paper was set else returns false. | |
Aleksey Shlyapnikov
2014/06/19 02:13:08
else -> otherwise
Vitaly Buka (NO REVIEWS)
2014/06/19 17:44:38
Done.
| |
67 bool UpdatePageFormatWithPaper(PMPaper paper, PMPageFormat page_format); | |
68 | |
64 // Sets the print job destination type as preview job. | 69 // Sets the print job destination type as preview job. |
65 // Returns true if the print job destination type is set. | 70 // Returns true if the print job destination type is set. |
66 bool SetPrintPreviewJob(); | 71 bool SetPrintPreviewJob(); |
67 | 72 |
68 // Sets |copies| in PMPrintSettings. | 73 // Sets |copies| in PMPrintSettings. |
69 // Returns true if the number of copies is set. | 74 // Returns true if the number of copies is set. |
70 bool SetCopiesInPrintSettings(int copies); | 75 bool SetCopiesInPrintSettings(int copies); |
71 | 76 |
72 // Sets |collate| in PMPrintSettings. | 77 // Sets |collate| in PMPrintSettings. |
73 // Returns true if |collate| is set. | 78 // Returns true if |collate| is set. |
(...skipping 17 matching lines...) Expand all Loading... | |
91 // The current page's context; only valid between NewPage and PageDone call | 96 // The current page's context; only valid between NewPage and PageDone call |
92 // pairs. | 97 // pairs. |
93 CGContext* context_; | 98 CGContext* context_; |
94 | 99 |
95 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac); | 100 DISALLOW_COPY_AND_ASSIGN(PrintingContextMac); |
96 }; | 101 }; |
97 | 102 |
98 } // namespace printing | 103 } // namespace printing |
99 | 104 |
100 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_ | 105 #endif // PRINTING_PRINTING_CONTEXT_MAC_H_ |
OLD | NEW |